Jump to content

[SOLVED] learning php - need help


bobocheez

Recommended Posts

Ok, so I have this code and I'm getting a wierd error

 

Table 'tutorial.tutorial' doesn't exist

The error if from the //TEST below

 

I'm using xampp if thats of any use

 

//OPENS CONNECTION TO MYSQL SERVER

$dbc = mysql_connect('localhost','root','');

if (!$dbc){

die('Not connected:' . mysql_error());

}

 

//SELECT DATABASE

$db_selected = mysql_select_db('tutorial', $dbc);

if (!$db_selected){

die ('cant connect:' . mysql_error());

}

 

//TEST

$query="UPDATE tutorial SET email='hope_this_works' WHERE username='bobo'";

$result=mysql_query($query);

if (!$result){

die ('update failed ->' . mysql_error());

}

 

 

Link to comment
https://forums.phpfreaks.com/topic/145154-solved-learning-php-need-help/
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.