0

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....

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by navi17
0

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?

0

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???

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.