Jump to content

PHP/MySQL Error


curbsy

Recommended Posts

regproc.php:

(01) <?php(02) //Import(03) include ("dbhndl.php");(04)(05) //Make user(06) mysql_query(INSERT INTO "users" (07) ("u_id", (08) "u_name", (09) "u_pswd", (10) "u_ses_id") (11) VALUES ("null", (12) "$_POST['uname']", (13) "$_POST['pword']", (14) "null"));(15)(16) echo "<meta http-equiv='refresh' content=1;URL=index.php>";(17) ?>

Error: Parse error: parse error, unexpected T_STRING in /home/users/curbsy/public_html/login/regproc.php on line 6

Link to comment
Share on other sites

I did happen to get this fixed:<?php//Importinclude ("dbhndl.php");//Re-assign$name=$_POST['uname'];$pass=$_POST['pword'];$db="curbsy";$link = mysql_connect("localhost", "curbsy", "emerson");if (! $link)die("Couldn't connect to MySQL");mysql_select_db($db , $link)or die("Couldn't open $db: ".mysql_error());mysql_query ("INSERT INTO users (u_id, u_name, u_pswd, u_ses_id) VALUES (NULL, '$name', '$pass', NULL)");mysql_close($link);?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...