| | |
Connection problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 13
Reputation:
Solved Threads: 0
<?php
<$conn=mysql_connect("localhost","root","root");
echo("connected");
if(!$conn)
{
die('could not connect:'.mysql_error());
}
mysql_select_db("student",$conn);
if (!mysql_select_db('student', $conn)) {
echo 'Could not select database';
exit;
}
?>
This the code..Using which I want to connect but getting the error:
Parse error: parse error in c:\apache\htdocs\phpmyadmin\connection.php on line 6
Plz help
<$conn=mysql_connect("localhost","root","root");
echo("connected");
if(!$conn)
{
die('could not connect:'.mysql_error());
}
mysql_select_db("student",$conn);
if (!mysql_select_db('student', $conn)) {
echo 'Could not select database';
exit;
}
?>
This the code..Using which I want to connect but getting the error:
Parse error: parse error in c:\apache\htdocs\phpmyadmin\connection.php on line 6
Plz help
•
•
•
•
<?php
<$conn=mysql_connect("localhost","root","root");
echo("connected");
if(!$conn)
{
die('could not connect:'.mysql_error());
}
mysql_select_db("student",$conn);
if (!mysql_select_db('student', $conn)) {
echo 'Could not select database';
exit;
}
?>
This the code..Using which I want to connect but getting the error:
Parse error: parse error in c:\apache\htdocs\phpmyadmin\connection.php on line 6
Plz help
PHP Syntax (Toggle Plain Text)
<?php <$conn=mysql_connect("localhost","root","root"); echo("connected"); ......
Please remove the "<" before $conn
Regards
IF SOMEONE FEELS THAT THEY HAD NEVER MADE A MISTAKE IN THEIR LIFE, THEN IT MEANS THEY HAD NEVER TRIED A NEW THING IN THEIR LIFE
![]() |
Similar Threads
- Vista and Connection Problem (Windows Vista and Windows 7)
- Yes. Yet another connection problem. (Viruses, Spyware and other Nasties)
- A7N8X-X MCP LAN Connection Problem (Windows NT / 2000 / XP)
- Internet Connection problem:Cable to modem to router to PC (Networking Hardware Configuration)
- AOL/router connection problem with msn messenger (Networking Hardware Configuration)
- Internet connection problem (Windows NT / 2000 / XP)
- Connection Problems (Networking Hardware Configuration)
Other Threads in the PHP Forum
- Previous Thread: Php Hurdle
- Next Thread: How to pass information to child processes
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





