Page 1 of 1

Registration

Posted: Sun May 16, 2010 1:48 pm
by vadlak
Can anyone help me out with this

Code: Select all

<?php

@mysql_connect("localhost","Blah", "Blah") or die("Cannot connect to DB!");
@mysql_select_db("hwhelper_User") or die("Cannot select DB!");
$Username = $_POST['Username'];
$Password =  $_POST['Password'];
$Email = $_POST['Email'];
$sql="INSERT INTO tbl_login (Username, Password, Email) VALUES (".$Username.",".$Password.",".$Email.")";
$r = mysql_query($sql);
if(!$r) {
$err=mysql_error();
print $err;
exit();
}

?>
I am trying to get it to write it to the Mysql database and yes i know the password and username say blah

Re: Registration

Posted: Sun May 16, 2010 2:20 pm
by requinix
Echo out your query and see if it looks correct to you.

And for heaven's sake, use mysql_real_escape_string.