|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
displaying database values through apache server
I am using php5, mysql 4.1, apache 2.0 version and using zend studio 5.5 as php IDE. when I run the following code from apache server I am getting blank page.
following is the code. I able to view the result in the zend IDE but when I run from IE browser, nothing is displayed. Is it related to any setting or something? for ex. http://localhost/test.php <html> <head> <title>php database connection test </title> </head> <body> <?php $dbhost = "localhost"; $dbuser = "root"; $dbpass = "roo"; $dbcnx = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); //$dbname = "hotdeals"; mysql_select_db("hotdeals", $dbcnx); if (!@mysql_select_db("hotdeals")) { exit('<p> unable to locate the hotdeals <p>'); } echo $dbcnx; $userid = "abc"; $password = "xyz"; echo $userid; echo $password; $query=mysql_query("insert into signup(userid,password) values('$userid','$password')"); echo $query; ?> </body> </html> |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > displaying database values through apache server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|