Re: working with mysql
- From: "Auddog" <will_k@xxxxxxxxxxx>
- Date: Thu, 06 Jul 2006 18:22:47 GMT
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message
news:7--dndlSwo3IzDDZnZ2dnUVZ_oadnZ2d@xxxxxxxxxxxxxx
Auddog wrote:
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message
news:AYadnQ-8XYQoojDZnZ2dnUVZ_q6dnZ2d@xxxxxxxxxxxxxx
Auddog wrote:
thanks, I should've known to place that at the top.
That being said, I still get nothing but a blank page
A
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message
news:IKydnfxTcfDetTDZnZ2dnUVZ_sCdnZ2d@xxxxxxxxxxxxxx
Auddog wrote:
I have tried all of the options listed and I have even tried this codeIf you get an error, you're throwing an exception but not catching it.
<?php
// example using procedural approach
if(!$db=mysqli_connect('localhost','root','password','pppe')){
throw new Exception('Error connecting to host.
'.mysqli_connect_error());
}
error_reporting(E_ALL);
// display host information
echo 'Host information: '.mysqli_get_host_info($db);
// close connection
mysqli_close($db);
?>
I still get nothing but a blank page
<taofik.hidayat@xxxxxxxxx> wrote in message
news:1152174121.598411.161670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If Windows you've installed, please make a folder tmp, like: c:\\tmp.
Auddog wrote:
I have installed php on my server and can get the phpinfo page to
display.
I have installed mysql 5 and I'm able to get into the database and
create
data. I would like to be able to get php to pull the data. I have
been
reading on the internet as to what I need to do in php and have
created a
couple of pages. When I go to the page all I get is a blank
screen - no
data from the database.
I edited my php.ini file to allow for mysql. I copied libmysql.dll
to my
c:\windows\system32 directory. Is there anything else that I need
to do to
make mysql and php work together?
Will
Rather, try:
error_reporting(E_ALL);
if(!$db=mysqli_connect('localhost','root','password','pppe')){
echo 'Error connecting to host. '.mysqli_connect_error());
exit();
}
... rest of code
(P.S. Please don't top post. Thanks.).
Again, please don't top post. This newsgroup uses bottom posting as a
standard.
Did you take out your throw statement and put in the echo like I asked?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
Here is my entire code:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Host Information</title>
</head>
<body>
<?php
error_reporting(E_ALL);
// example using procedural approach
if(!$db=mysqli_connect('localhost','root','password','ppe'))
{
echo 'Error connecting to host. '.mysqli_connect_error());
exit();
}
// display host information
echo 'Host information: '.mysqli_get_host_info($db);
// close connection
mysqli_close($db);
?>
</body>
</html>
Here's something else that I find odd. If I change the title to the web
page and save, when I bring up the page, I does not reflect the change.
I just can't figure out what is wrong.
A
ps - sorry about the top posts
OK, that's important. It means either you're loading the wrong page, or
the page is being cached - either by your browser or somewhere along the
line.
Try renaming your file to something you haven't used before and see what
happens. Also try clearing the cache in your browser.
And thanks for bottom posting!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
When I rename the file it doesn't load the title in either IE6 or firefox.
If I delete all the files and history in IE6, I still have the same problem.
Did I miss something in the ini file or might have I not copied all the
files to the correct location?
A
.
- Follow-Ups:
- Re: working with mysql
- From: Auddog
- Re: working with mysql
- References:
- working with mysql
- From: Auddog
- Re: working with mysql
- From: taofik.hidayat@xxxxxxxxx
- Re: working with mysql
- From: Auddog
- Re: working with mysql
- From: Jerry Stuckle
- Re: working with mysql
- From: Auddog
- Re: working with mysql
- From: Jerry Stuckle
- Re: working with mysql
- From: Auddog
- Re: working with mysql
- From: Jerry Stuckle
- working with mysql
- Prev by Date: Re: working with mysql
- Next by Date: Search page result links
- Previous by thread: Re: working with mysql
- Next by thread: Re: working with mysql
- Index(es):
Relevant Pages
|