Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\register.php on line 56?
-
i am getting this error, what's wrong with my code? (CODE) <?php //Database Information $dbhost = "localhost"; $dbname = "register"; $dbuser = "root"; $dbpass = "secret"; //Connect to database mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $name = $_POST['name']; $email = $_POST['email']; $username = $_POST['username']; $password = $_POST['password']; //check the database for existing users $checkuser = mysql_query("SELECT username FROM users WHERE username='$username'"); $username_exist = mysql_num_rows($checkuser); if($username_exist > 0){ echo "I'm sorry but the username you specified has already been taken. Please pick another one."; unset($username); include 'register.html'; exit(); } //store the data in our database and tell the user that they have successfully registered $query = "INSERT INTO users (name, email, username, password) VALUES('$name', '$email', '$username', '$password')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "You have successfully Registered"; //email the user their data $yoursite = "www.crmnhs.freeoda.com"; $webmaster = "najarrodaisy"; $youremail = "[email protected]"; $subject = "You have successfully registered at $yoursite..."; $message = "Dear $name, you are now registered at our web site. To login, simply go to our web page and enter in the following details in the login form: Username: $username Password: $password Please print this information out and store it for future reference. Thanks, $webmaster"; mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer:PHP/" . phpversion()); echo "Your information has been mailed to your email address."; ?> now, line 56 is $webmaster = "najarrodaisy"; pls help, im new to php,. thank you.
-
Answer:
========================================… $subject = "You have successfully registered at ".$yoursite."..."; $message = "Dear ".$name.", you are now registered at our web site. To login, simply go to our web page and enter in the following details in the login form: Username: ".$username." Password: ".$password." Please print this information out and store it for future reference. Thanks, ".$webmaster.""; ======================================… replace your code with this.
missnice at Yahoo! Answers Visit the source
Related Q & A:
- How to parse inner array in JSON response with PHP?Best solution by Stack Overflow
- How to parse SOAP response with PHP?Best solution by Stack Overflow
- How can I parse a complex XML with PHP and CDATA?Best solution by Stack Overflow
- How do i correct syntax error?Best solution by Yahoo! Answers
- How to correct syntax error in Yahoo mail page?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.