So this is driving me insane. usually i can figure stuff like this out by searching the net but no luck so far.
im trying to create a sign up form for a webpage and have it post to a .php the shoot it over to mysql.
as far as i can tell the html works(i may be wrong ) but everytime i try to submit the info from the table it gives me this:
Parse error: syntax error, unexpected ‘"’, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\testfile\PS_Test\signup.php on line 25
i already have my tables set up in mysql i just need to insert the data from the table.
PLEASE HELP, im begging
<form action="signup.php" method=POST>
<table width="300" border="1" align="center" cellpadding="1" cellspacing="1" bgcolor="#000000">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#000000">
<tr>
<td colspan="3"><strong><center>Sign Up<center></strong></td>
</tr>
<tr>
<td width="78">Firstname</td>
<td width="6">:</td>
<td wisth="294"><input name="Firstname" type="text" id="firstname"></td>
</tr>
<tr>
<td width="78">Lastname</td>
<td width="6">:</td>
<td wisth="294"><input name="Lastname" type="text" id="lastname"></td>
</tr>
<td width="78">Age</td>
<td width="6">:</td>
<td wisth="294"><input name="Age" type="text" id="age" </td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input name="mypassword" type="text" id="mypassword"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
[php]
<?php $con = mysql_connect("localhost","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } else { echo "Connection Successfull"; } $dataselect = mysql_select_db("projectsims_users" ,$con); if(!$dataselect) { die("database not selected".mysql_error()); } $qry=mysql_query("INSERT INTO data_base(Username, Password, FirstName, LastName, Age) VALUES ('$_POST["Username"]','$_POST["Password"]','$_POST["FirstName"]','$_POST["LastName"]','$_POST["Age"]')",$con); if(!$qry) { die("table not created".mysql_error()); } else { echo "values inserted into table successfully"; } ?>[/php]