Re: Re: PHP any Mysql connection- new b

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You didnt mentioned where your problem is and what the error that you are
getting.
check in the line

mysql_select_db (userpass);

That you have the grant and other administrative privilages to the user and
the database
you have to operate on is "mysql"

mysql_select_db (mysql);

Anyhow note that PHP5 has released...i dont see any good reason why u r
still using php 3.

/sagar
----- Original Message -----
From: "M. Sokolewicz" <tularis@xxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Saturday, January 08, 2005 9:55 PM
Subject:  Re: PHP any Mysql connection- new b


> php 3.0???!
>
> man, you seriously need to think about upgrading :| PHP 3 is seriously
> outdated
>
> - tul
> Babu wrote:
>
> > Hi all,
> >
> > I am using php 3.0 and mysql and win xp.
> > i want to add users to database through php page.
> >
> > adduser.php
> > <html>
> > <FORM METHOD="post" ACTION="add.php">
> > Real Name: <INPUT TYPE=text MAXLENGTH=70 NAME="real_name" SIZE=20><Br>
> > Username: <INPUT TYPE=text MAXLENGTH=70 NAME="username" SIZE=20><Br>
> > Password: <Input Type=text Maxlength=70 Name="userpass" Size=10><Br>
> >
> > <INPUT TYPE=submit VALUE="Add"> <INPUT type=reset VALUE="Reset
Form"></form>
> > </tr></td></table></tr></td></table>
> > </body>
> > </html>
> >
> > when i enter the fileds and submit ,the action is not performed, instead
add.php file is opened.
> >
> > add.php
> > <?
> >
> > $ID = uniqid("userID");
> >
> > $db = mysql_connect("localhost","root","halfdinner");
> >
> > mysql_select_db (userpass);
> >
> > $result = mysql_query ("INSERT INTO users (id, real_name, username,
password )
> > VALUES ('$ID', '$real_name', '$username', '$userpass') ");
> > if(!$result)
> >

> > echo "<b>User not added:</b> ", mysql_error();
> > exit;
> > }
> > if($result)
> >

> > mysql_close($db);
> > print "User <b>$username</b> added sucessfully!";
> > }
> > else
> >

> > print ("Wrong Password");
> > }
> > ?>
> >
> > is the problem due to mysql and php connection.i am using windows xp
with apache2.
> >
> > i followed the steps said by someone in the previous thread.that is
adding libmysql.dll to system32 and so on. I cannot find php_mysql.dll in
php.ini.
> > can some one help
> >
> > Thanks
> > babu
> >
> >
> >
> > ---------------------------------
> >  ALL-NEW Yahoo! Messenger - all new features - even more fun!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux