Jump to content

[SOLVED] Newbie needs help Im going crazy with this error code.


pnkgirl25

Recommended Posts

I am receiving the following errors:

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/f/o/c/focusevents/html/config.php on line 8

 

Parse error: parse error, unexpected T_VARIABLE in /home/content/f/o/c/focusevents/html/config.php on line 9

 

<?php
$host="p41mysql63.secureserver.net"; // Host name ?$username="CourtneyBlacher"; // Mysql username ?$password="Fem62656265"; // Mysql password ?$db_name="temp_members_db"; // Database name ???//Connect to server and select database.?mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); ?mysql_select_db("$db_name")or die("cannot select DB");
?>

 

 

Any help at all would be great

You php file code that you have pasted is not in correct format, but i think your problem is that you are having '?' in everyline...also while ending the php scriptlet your ending it like '??>'

 

Please paste the proper  code for better help.

use this

<?php
$host="p41mysql63.secureserver.net"; // Host name ?
$username="CourtneyBlacher"; // Mysql username ?
$password="######"; // Mysql password ?
$db_name="temp_members_db"; // Database name ???//Connect to server and select database.?
mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); ?
mysql_select_db("$db_name")or die("cannot select DB");
?>

 

replaced ###### with password

try this out

 


<?php
$host="p41mysql63.secureserver.net"; // Host name 
$username="CourtneyBlacher"; // Mysql username 
$password="######"; // Mysql password 
$db_name="temp_members_db"; // Database name 
//Connect to server and select database.
mysql_connect($host, $username, $password) or die("cannot connect to server");
mysql_select_db($db_name) or die("cannot select DB");
?>

The code I am is bellow. When I pasted it into this forum I hit the code link but it still seems to not be formated right for you guys to review. How do I format it so I can past the right code? Also, the color code that appears is not the same code im looking at on my screen. I dont know why it keeps changing

 

<?php
$host="p41mysql63.secureserver.net"; 
$username="CourtneyBlacher";
$password="*********"; 
$db_name="temp_members_db";
Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); 
mysql_select_db("$db_name")or die("cannot select DB");
?>

try this out

 


<?php
$host="p41mysql63.secureserver.net"; // Host name 
$username="CourtneyBlacher"; // Mysql username 
$password="######"; // Mysql password 
$db_name="temp_members_db"; // Database name 
//Connect to server and select database.
mysql_connect($host, $username, $password) or die("cannot connect to server");
mysql_select_db($db_name) or die("cannot select DB");
?>

 

I tried the code you gave me and still no luck.

using either

itsmeArry or my code (as their the same)

 

can you paste that into notepad and save it and upload it

 

what editor are you currently using?

 

the reason i ask, is because the code is fine but the editor is probably messing it up.. can you edit in text only mode ( or source)

Im getting the following errors

 

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/f/o/c/focusevents/html/config.php on line 7

 

Parse error: parse error, unexpected T_VARIABLE in /home/content/f/o/c/focusevents/html/config.php on line 8

Updated code is:

 

<?php
$host="p41mysql63.secureserver.net"; // Host name 
$username="CourtneyBlacher"; // Mysql username 
$password="###########"; // Mysql password 
$db_name="temp_members_db"; // Database name 
//Connect to server and select database.
mysql_connect($host, $username, $password) or die("cannot connect to server");
mysql_select_db($db_name) or die("cannot select DB");
?>

 

Also, the password and user name are correct because the are working on the log in script I created.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.