Jump to content

If error?


Twango

Recommended Posts

I cant tell why this isnt working:<?phpecho "<b>If no 1 Record Added MSG appears, add failed</B>";$mh = "***";$md = "***";$mu = "***";$mp = ***";$con = mysql_connect($mh,$mu,$mp);if ($_POST["Modpass"] == "***"){if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db($md, $con);$sql="INSERT INTO Accounts (Usr, Pw, Special)VALUES('$_POST[Account]','$_POST[Password]','$_POST[special]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";mysql_close($con)}?><br/><a href="addus.html">Add</a><br/><a href="userdata.php">List</a>I hid the variables for safety.Why isnt this working?I'd also like to add "else"Thanks, giving error:Parse error: syntax error, unexpected '}' in /home/a5301810/public_html/addus.php on line 30

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...