Jump to content

[SOLVED] Data not being added to database


AKalair

Recommended Posts

Hi guys,

I'm not developing a simple register page but despite saying the data's been added when I check it hasnt?

 

<?php

connect data




$query = "INSERT INTO users(username) VALUES({$_POST['username']}, 1)";



$result = mysql_query($query);

 

Any ideas Thanks.

 

 

echo "The data has been added to the database.";

 

 

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/124445-solved-data-not-being-added-to-database/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.