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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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");
?>

Link to comment
Share on other sites

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");
?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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