Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am using php5 and using zend studio 5.5 as php IDE. I am using mysql database
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.phpCode: Select all
<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>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]3.[/b] Do not make multiple, identical posts. This is viewed as spam and will be deleted.[/quote]