Insert Not working
Posted: Fri Nov 11, 2005 12:48 pm
Jcart | Please use
The database doesn't update from this query, and I have no idea why.
I'm sure it's something stupid that I've overlooked...I'm pretty new to php and mysql so any help would be appreciated.
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi, this is my first post on the board. I'm currently trying to make a simple login system for my webpage. I have already set up the ability to login by comparing values in a form to values from a database. Now I want to implement the ability to add a new user to the database, but I'm stuck. Here is the code that is not working.Code: Select all
$mysql = mysqli_connect( 'localhost', 'root', '');
$selected = mysqli_select_db( $mysql, 'auth' );
$query = "insert into authorized_users values("$_POST['name'], $_POST['password'], $_POST['fname'], $_POST['lname'], $_POST['email']");
$result = mysqli_query("$mysql, $query);I'm sure it's something stupid that I've overlooked...I'm pretty new to php and mysql so any help would be appreciated.
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]