| Author |
Topic |
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:05:41
|
| I'm pretty new to sql and what I need to do is pass some information to the sql database though the web address. Example..http://mywebsite.com/index.html?name=danWhere I want it to if someone clicks that link it adds the name dan to the database.I hope you understand what I'm after, it's kinda odd and I can't seem to find an answer by searching because I'm not really sure what I'm searching for or what it's called. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-20 : 18:07:54
|
| That's more of an asp and ado problem than a SQL Server problem. I'd suggest posting your question in the relevant forum over at www.asp.net .Tara Kizer |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-12-20 : 18:09:32
|
You can do this if you use an asp/aspx/php/whatever page instead of a simple html page. such technologies allow you to get at the query string (everything following the ? in a url). Once you have that, you can do what ever you like with it (such as write it to a database). www.elsasoft.org |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:20:27
|
| Ugh, I am so confused. I'll check out the php and asp sites and see if I can figure something out. I really just need to send a dynamic data from a link and also retrieve the data the same way. Like I said, it's odd. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-20 : 18:25:13
|
| There's nothing odd about your question. It's a normal thing to do from a web site that interacts with a database. But you must have a programming language such as asp or asp.net to do the work.Tara Kizer |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:27:31
|
| Wouldn't simple php be easier? Now just to figure out how to pass a few simple variables to the database from the php page.. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-20 : 18:32:45
|
| I'm a Microsoft person, so asp.net would be the way that I would go.Tara Kizer |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:33:32
|
| What would be the easiest since I'm pretty dumb? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-20 : 18:37:31
|
| Everyone will have their own opinion about what's easiest. Take a look at both and see what syntax you prefer.Tara Kizer |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:49:43
|
| I think I found the best way for me to do what I want. Much more simple then I thought it would be. I can use something like.http://myserver.com/index.php?name=dan&number=50Then in the webpage I can have it pass the 2 values to the database.Now I just need to figure out how to do that. lol |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 18:58:27
|
| Is this right?<?mysql_query("INSERT INTO `data` VALUES ('$name', '$number')"); ?>Probably not. Like I said, I'm a really new at this. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-12-20 : 19:04:24
|
| Well now we see you are using mysql. This is a SQL Server forum, so our answers will be T-SQL rather than mysql. Plus you really need to post your question on a forum that deals with the programming language that you have chosen, since it's a programming question.Tara Kizer |
 |
|
|
danx
Starting Member
7 Posts |
Posted - 2006-12-20 : 19:07:32
|
| Sorry I thought it was a general sql forum. And since it's programming and sql I thought I could come here or answers. I'll try somewhere else. |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-12-22 : 15:43:03
|
try www.dbforums.com www.elsasoft.org |
 |
|
|
|