output not load

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jayson.ph
Forum Contributor
Posts: 165
Joined: Mon Jan 02, 2012 9:20 am
Location: MP
Contact:

output not load

Post by jayson.ph »

hi all

i am a beginner and i got this problem that never been load the output.

Code: Select all

<?php
$conn = msql_connect("localhost","jayson.ph", "usaqatai");
	if(!$conn){
	die("could not connect:" .msql_error());
	}
echo "successfully connected";
		mysql_close($conn);
?>


file:///C:/wamp/www/home/index.php

please help, thanks
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: output not load

Post by social_experiment »

Are any errors printed to the browser?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
jayson.ph
Forum Contributor
Posts: 165
Joined: Mon Jan 02, 2012 9:20 am
Location: MP
Contact:

Re: output not load

Post by jayson.ph »

ah no. nothing, and i dont know if it is connected to wamp i used, but the wamp is running.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: output not load

Post by social_experiment »

Code: Select all

<?php
$conn = msql_connect("localhost","jayson.ph", "usaqatai");
        if(!$conn){
        die("could not connect:" .msql_error());
        }
        else {
           echo 'connected successfully'; 
        }
                mysql_close($conn);
?>
Try this; Also, are you using mysql or msql?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
jayson.ph
Forum Contributor
Posts: 165
Joined: Mon Jan 02, 2012 9:20 am
Location: MP
Contact:

Re: output not load

Post by jayson.ph »

hi social_experiment thanks and i get it.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: output not load

Post by social_experiment »

ok, if you do use msql you should use msql_close() instead of mysql_close()
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply