DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   connectivity problem (http://www.daniweb.com/forums/thread164614.html)

navi17 Dec 28th, 2008 1:31 pm
connectivity problem
 
hi friends....
i m new to php....

i have installed apachie 2.0,php 5.2,mysql5.1...
everything is going welll....
bt dere is problem using d following code,,
<php
mysql_connect("localhost", "root", "mars11") or die(mysql_error());
echo "Connected to MySQL<br />";
</php>

i hv save it in the htdocs folder under apachie...filename is test.php
bt when i run it nothing is displayed...
wats going on pls solve my problem....

buddylee17 Dec 28th, 2008 3:13 pm
Re: connectivity problem
 
For starters, <php is not a valid delimiter. Use <?php to start the code and ?> to end it. Is Apache and php configured correctly? Have you tried a simple
<?php echo "It works.";?>
type script to test the server?

navi17 Dec 29th, 2008 2:06 am
Re: connectivity problem
 
yes... php,apachie and mysql are configured correctly...

yes scripts are running.............
everything is going well..
i hv also tried
<?php
>?
bt again d proble is same while running dis script.
<?php
mysql_connect("localhost", "root", "mars11") or die(mysql_error());
echo "Connected to MySQL<br />";
>?

wat should i do???


All times are GMT -4. The time now is 2:17 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC