Forumchem - Forum with AI(ALICE BOT & HAL9000) and TTS

More dificult for us, more easy for you
It is currently Thu Apr 25, 2024 12:53 am

All times are UTC





Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 
Author Message
 Post subject: What is wrong with my PHP?
PostPosted: Mon Apr 17, 2017 10:58 am 
Offline
User avatar

Joined: Sat Oct 17, 2009 8:38 am
Posts: 10
Im trying to design a website for a school project and I created this code for the registration page.

$userreg = $_POST[newuser];
$passreg = $_POST[newpass];

$taken = false;
$database = seniorproject;
$password = ;
$username = root;

if($userreg&&$passreg)

$con = mysql_connect(localhost,$username,$password) or die ("Unable to log in to database");
***($database, $con) or die ("Unable to connect");

mysql_query("INSERT INTO user VALUES(,$userreg, $passreg)") or die ("Error");

echo "Account Creation Successful";

mysql_close($con);

header("Location: index.html");

else
echo "Error: You need to have both a username and password";


?>

But it keeps giving me this error: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /Applications/XAMPP/xamppfiles/htdocs/register.php:13 Stack trace: #0 main thrown in /Applications/XAMPP/xamppfiles/htdocs/register.php on line 13

Whats wrong? any help would be appreciated, thanks guys!



Top
 Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: vawceix and 6 guests


 
Search for:
 
Jump to:  

cron
Click me:
Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009 phpBB Group
Chronicles phpBB3 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage

This site have 4 type of tecnology in order to convert text to speech. By default you use the vozme tecnology. In order to know the other you need to sign for.


- Privacy Policy -