Jump to content

problem with register Username


kof20012

Recommended Posts

hi there,

i got o problem creating the register Username page (Join.php)

this is the same example from the book, "Creating interactive websites with php and web services"

i dont know what the problem with code.

 

here is the code and the errors

 

errors:

 

Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\tfc\join.php on line 116 -

			$contaUsername = mysql_result(mysql_query("select count (*) as contaUsername from membros where username = '{$_POST['username']}'"),0);

Fatal error: Cannot instantiate non-existent class: email in c:\apache\htdocs\tfc\join.php on line 147

$mailer = &new email;

 

i have attached the file.

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/112916-problem-with-register-username/
Share on other sites

i think yes...

 

i already create the database with WinMySQLAdim

I already create the table Members (Membros)

 

if not, how ca i put make the connection?

 

$ligacao=mysql_pconnect('localhost', 'ODBC', '') or die("Problemas de ligaçao");

mysql_select_db("TFC", $ligacao);

 

ODBC is the username, since i dont make the U/P i think the random username is the ODBC

TFC is the name of the DATABASE

 

Correct?

 

 

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.