| | |
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 ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time display dynamic echo email error file files folder form forms function functions global google href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail memmory menu mlm mod_rewrite msqli_multi_query multiple mycodeisbad mysql navigation oop parameter paypal pdf php problem query radio random recourse recursion regex registrationform remote script search seo server sessions sms soap source space sql static syntax system table tutorial update upload url validation validator variable video web webdesign wordpress xml youtube





