View previous topic :: View next topic |
Author |
Message |
wlebargy -
Joined: 24 Nov 2004 Posts: 1
|
Posted: Thu Jun 02, 2005 7:52 pm Post subject: Error 200 |
|
|
Code: | <? $name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$mobile = $_REQUEST['mobile'];
$email = stripslashes($_REQUEST['email'];
$db = @mysql_connect('localhost', 'root', '#######');
mysql_select_db('address', $db);
$sql = "INSERT INTO address SET
name=$name,
phone=$phone,
mobile=$mobile,
email=addslashes($email)";
if ($sql) {
echo "You addded your info to the database...well done";
} else { echo "it failed...moron."; }
?> |
when i submit my form to this page all i get is "error 200" page. Why is this and what causes error 200? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Fri Jun 03, 2005 3:12 am Post subject: |
|
|
Unless putting a variable called sql causes a mysql query (I doubt it, and im not aware of it.) you'll need to put if(mysql_query($sql)), I believe. _________________
 |
|
Back to top |
 |
 |
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Fri Jun 03, 2005 3:24 am Post subject: |
|
|
Just wondering, what does the @ Symbol do in "@mysql_connect" or does it not belong there? |
|
Back to top |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Fri Jun 03, 2005 3:41 am Post subject: |
|
|
Tim1681 wrote: | Just wondering, what does the @ Symbol do in "@mysql_connect" or does it not belong there? |
I don't think its 100% nessecarry, but I don't know its function.
As for the orignal post, well you have to acctually excute that SQL string. I have a bad memory, and I can't remember what the command was. Im going to get a huge piece of paper and write things like this on it. _________________
 |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
|
Back to top |
|
 |
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Fri Jun 03, 2005 9:19 pm Post subject: |
|
|
Ah, thnx again aprelium lol. Never knew that =) |
|
Back to top |
|
 |
|