PHP - Parse Error: Syntax Error, Unexpected T_constant_encapsed_string In Date Stamp
I am getting syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
on the date stamp line below but I can't see what is causing the problem. when I comment it out the problem goes away so I know I it is there. please help. $email_message = "Form details below.\n\n"; $email_message = date("m/d/Y")"\n"; Similar TutorialsHi, I keep getting the above error when testing out my system. The section of code that is having the error is: if ($_SESSION['username']=='login') { if (isset($_REQUEST['file'])) { $fc = file_get_contents($_REQUEST['file']); $text = explode("<!-- EDITABLE -->",$fc); echo "<form method='post' action=''><textarea name='content'>$text[1]</textarea>"; echo "<p><input type='hidden' name='file' value='".$_REQUEST['file']."' /><input name='submitUpdate' type='submit' value='Update Page'></form>"; } else { // edit to link to your own static html files echo "<p align='center'> <a href="?index.html">Home Page</a><br/> <a href="?contact_us.html">Contact Us</a><br/> //THIS IS THE LINE THATS GIVING ME THE PROBLEM <br/> <em>Click on the links above to edit the files.</em><br/> <a href="?logout">logout</a></p>"; } } Can anybody help? I'd really appreciate it. Thanks in advance Hello fellow phpfeaks, I have been working on debugging this script for hours. I am getting this error message: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/heartl20/public_html/sendmail.php on line 58 Here is the php portion of the code with line 58 identified. I don't think that line 58 is really the offender but something in the code is. Your help for this php newbie is much appreciated. Also any suggestions on making this script better would be appreciated also. Code: [Select] <?php include ('class.Date.php'); $oDate = new Date; $sDate = $oDate->GenerateCurrentDate(); // print 'The time is: ' . $sTime; if(!isset($_POST['submit'])) { //This page should not be accessed directly. Need to submit the form. echo "error; you need to submit the form!"; } $firstname = $_POST['FirstName']; $lastname = $_POST['LastName']; $name = $firstname." ".$lastname; $visitor_email = $_POST['Emailadd']; $message = $_POST['spec_request']; $orgname = $_POST['OrgName']; $mailaddress = $_POST['mailaddress']; $city = $_POST['city']; $state = $_POST['Mstate']; $zip = $_POST['zip']; $phone = $_POST['phone']; $ipadd = $_POST['ipadd']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; if(IsInjected($visitor_email)) { echo "Bad email value!"; exit; } $server = "ecbiz76.inmotionhosting.com"; $username = "heartl20_cntacts"; $password = "HeartConts1"; $link = @mysql_connect ($server, $username, $password) or die (mysql_error()); if (!@mysql_select_db("heartl20_contactusdb", $link)) { echo "<p>There has been an error. This is the error message:</p>"; echo "<p><strong>" . mysql_error() . "</strong></p>"; echo "Please Contact Your Systems Administrator with the details"; } $sql = "SELECT * FROM directemail"; $sql .= " WHERE (Rec_ID = '{$_POST['SelRecp']}')"; $result = mysql_query($sql, $link); if (!$result) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $Rec_ID = $row['Rec_ID']; $FullName = $row['FullName']; $Function = $row['Function']; $EmailAdd = $row['EmailAdd']; } $email_from = 'postmaster@heartlandindustries.org'; $email_subject = "Contact Us Form submission"; $email_body = "$FullName, You have received an inquiry from $name \r" "Here is the message: \r" //This is line 58 "$message \r" "Additional Information: \r" "Mailing Address: $mailaddress \r" "$city $state, $zip \r" "Phone: $phone \r" "This message was sent on: $sDate From: $ipadd \r" "Using: $httpagent "; $to = "harold@haroldrau.com"; $headers = "From: $email_from \r\n"; $headers .= "Reply-To: $visitor_email \r\n"; mail($to,$email_subject,$email_body,$headers); // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } /* Closes Connection to the MySQL server */ mysql_close ($link); ?> Hi im having trouble with this coding and this error: 'Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/fightwa1/public_html/fightrd1.php on line 1' Code: [Select] <?php include 'connect.php'; include 'fightheaderrd1.php'; session_start(); $username = $_SESSION['loginusername']; if (isset($_SESSION['loginusername'])){ echo "<center><h2>Round 1</h2></center><br /><br />"; $result = mysql_query("SELECT * FROM boxerinfo WHERE username = '$username' AND status = 'online'"); while($row = mysql_fetch_array($result)) { echo "<div id='bluecorner'><table border='1' bordercolor='#000000' width='150' align='center'>"; echo "<tr bgcolor='#0000FF'>"; echo "<th align='center'><font color='#FFFFFF'>".$row['username']."</font></th>"; echo "</tr>"; echo "</table></div>"; } $result2 = mysql_query("SELECT * FROM boxerinfo WHERE fighterrequest = '$username' AND status = 'online'"); while($row2 = mysql_fetch_array($result2)) { echo "<div id='redcorner'><table border='1' bordercolor='#000000' width='150' align='center'>"; echo "<tr bgcolor='#990002'>"; echo "<th align='center'><font color='#FFFFFF'>".$row2['username']."</font></th>"; echo "</tr>"; echo "</table></div>"; } ?> <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" type="text/javascript">/* script comment */</script> <div id="display"></div> <script type="text/javascript"> //<![CDATA[ // Number of seconds to wait between refreshes var seconds = 10; // Function to handle refreshing every iteration var refresher = function() { // Adding data to the request forces the POST method to be used by jQuery // rather than adding something useless like a timestamp, // send something like the location of the calling page var data_to_send = {location: window.location}; // Load the contents of the page into the <div> $('#display').load('fightlivecommentary.php'); } // Set the function up to execute every "seconds" seconds // Save a reference to the interval so we can stop it with "clearInterval(refreshing)" later var refreshing = setInterval(refresher, seconds * 1000); //]]> </script> <? }else{ echo "Please <b>Sign In</b> above or <a href='signup.php'><b>Sign Up</b></a> to create your boxer!</a>"; } include 'footer.php'; ?> Thanks for any help Hello guys, I have a problem with the php, I have got an parse error, the error is: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myuser/public_html/mysite.com/email.php on line 69 <?php session_start(); define('DB_HOST', 'localhost'); define('DB_USER', 'user'); define('DB_PASSWORD', 'pass'); define('DB_DATABASE', 'mydbname'); $errmsg_arr = array(); $errflag = false; $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } function clean($var){ return mysql_real_escape_string(strip_tags($var)); } $name = clean($_GET['name']); $email = clean($_GET['email']); $comments = clean($_GET['comments']); $rate = clean($_GET['rate']); if($name == '') { $errmsg_arr[] = 'name or member ID missing'; $errflag = true; } else { } if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; echo implode('<br />',$errmsg_arr); } else { $insert = array(); if(isset($_GET['name'])) { $insert[] = 'member_or_from = \'' . clean($_GET['name']) .'\''; // echo "tested"; } if(isset($_GET['email'])) { $insert[] = 'email_address = \'' . clean($_GET['email']) . '\''; } if(isset($_GET['comments'])) { $insert[] = 'comments = \'' . clean($_GET['comments']) . '\''; } if(isset($_GET['rate'])) { $insert[] = 'rate = \'' . clean($_GET['rate']) . '\''; } if (count($insert)>0) { $names = implode(',',$insert); if(isset($name)) { $to = "myemail@myemail.com"; $subject = $type'; $message = '$comments', '$rate'; $headers = 'From: $name '@myemail.com'' mail($to, $subject, $message, $headers); } else { $to = "myemail@myemail.com"; $subject = $type'; $message = '$comments', '$rate'; $headers = 'From: $email' mail($to, $subject, $message, $headers); if (!mysql_query($sql,$link)) { die('Error: ' . mysql_error()); } echo "Thank you for sent us the feedback"; } } } ?> I don't know where it went wrong in line 69. Please could any of you help me to correct the problem I am getting?? Any advise would be much appreciate. Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\mywork\unique.php on line 15 <html> <head> <title> </title> </head> <body bgproperties="fixed"> <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $con = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'mywork'; mysql_select_db($dbname, $con); $sql=mysql_query(insert into users (regno,name,gender,date,month,year,emailid,cell,paddress,caddress,incometype,incomeamt,dad,fyes,dadocup,mom,myes,momocup,password) VALUES ('$_POST[regno]','$_POST[name]','$_POST[gender]','$_POST[date]','$_POST[month]','$_POST[year]','$_POST[emailid]','$_POST[cell]','$_POST[paddress]','$_POST[caddress]','$_POST[incometype]','$_POST[incomeamt]','$_POST[dad]','$_POST[fyes]','$_POST[dadocup]','$_POST[mom]','$_POST[myes]','$_POST[momocup]','$_POST[password]')"); $sql1=mysql_fetch_array($sql); $result = @mysql_query($SQl1); $result="SELECT * FROM users WHERE regno='$regno'"; while($row = mysql_fetch_array($result)) { //echo $row['regno']."regno<br>"; //echo $row['name']."name<br>"; //echo $row['gender']."gender<br>"; //echo $row['date']."date<br>"; //echo $row['month']."month<br>"; //echo $row['year']."year<br>"; //echo $row['emailid']."emailid<br>"; //echo $row['cell']."cell<br>"; //echo $row['paddress']."paddress<br>"; //echo $row['caddress']."caddress<br>"; //echo $row['incometype']."incometype<br>"; //echo $row['incomeamt']."incomeamt<br>"; //echo $row['dad']."dad<br>"; //echo $row['fyes']."fyes<br>"; //echo $row['dadocup']."dadocup<br>"; //echo $row['mom']."mom<br>"; //echo $row['myes']."myes<br>"; //echo $row['momocup']."momocup<br>"; //echo $row['password']."password<br>"; } echo "Thanks for Register!"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con); ?> <form name="security" action="index.php" method="post"> <input type="submit" value="click here to login"> </form> </body> </html> I just enabled error reporting and I am not that familiar with it. I know I have an error some where around line 33. I know I am missing a bracket or a comma or some other syntax error I just cannot find where the error is. Below is my script. Thanks for any help. Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Airline Survey</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Revised by abc1234"/> </head> <body> <?php $WaitTime = addslashes($_POST["wait_time"]); $Friendliness = addslashes($_POST["friendliness"]); $Space = addslashes($_POST["space"]); $Comfort = addslashes($_POST["comfort"]); $Cleanliness = addslashes($_POST["cleanliness"]); $Noise = addslashes($_POST["noise"]); if (empty($WaitTime) || empty($Friendliness) || empty($Space) || empty($Comfort) || empty($Cleanliness) || empty($Noise)) echo "<hr /><p>You must enter a value in each field. Click your browser's Back button to return to the form.</p><hr />"; else { $Entry = $WaitTime . "\n"; $Entry .= $Friendliness . "\n"; $Entry .= $Space . "\n"; $Entry .= $Comfort . "\n"; $Entry .= $Cleanliness . "\n"; $Entry .= $Noise . "\n"; $SurveyFile = fopen("survey.txt", "w") } if (flock($SurveyFile, LOCK_EX)) { if (fwrite($SurveyFile, $Entry) > 0) { echo "<p>The entry has been successfully added.</p>"; flock($SurveyFile, LOCK_UN; fclose($SurveyFile); else echo "<p>The entry could not be saved!</p>"; } else echo "<p>The entry could not be saved!</p>"; } ?d> <p><a href="AirlineSurvey.html">Return to Airline Survey</a></p> </body> </html> I don`t get it, waht is wrong?! Code: [Select] <?php require_once 'auth.php'; if (!isset($_SESSION['SESS_VERIFY'])) { header("location: access-denied.php"); exit(); } if ($_SESSION['lang'] == 'Ro') { // setare data romania date_default_timezone_set('Europe/Bucharest'); $today = getdate(); $zi = $today['mday']; $luna = $today['mon']; $lunastring = $today['month']; $an = $today['year']; $data = $zi.$luna.$an; $data = (string)$data; $ora = date('H:i:s'); $msg = array(); $err = array(); $luni = array ( 1=>'Ianuarie', 2=>'Februarie', 3=>'Martie', 4=>'Aprilie', 5=>'Mai', 6=>'Iunie', 7=>'Iulie', 8=>'August', 9=>'Septembrie', 10=>'Octobrie', 11=>'Noiembrie', 12=>'Decembrie'); // comun const SQL_ERR = 'SQL statement failed with error: '; const ADD_MODEL = 'ADAUGA UN MODEL NOU'; . .many constants.. . } elseif ($_SESSION['lang'] == 'It') {... Thank you!
Hello everyone,
1 <?php
7 // Create connection
10 // Check connection
14 $firstname = $conn->real_escape_string($_REQUEST['firstname']); 25 $sql2 = "INSERT INTO countries VALUES ('$country')"; 27 $sql3 = "INSERT INTO Contacts (firstname, lastname, address, city, country, phone, email) VALUES ('$firstname', '$lastname', '$address', $city, $country, '$phone_number','$email')";
29 SELECT * FROM cities;
if($conn->query($sql2) === true){
if($conn->query($sql3) === true){ I have been trying to get my files to upload onto a computer and I receive this message: Parse error: syntax error, unexpected T_STRING in /home/content/19/6550319/html/listing.php on line 27. Line 27 is how the php logs into my SQL. The problem is that I was able to log in before. I just made changes to the form by adding a dropdown menu and price and now it says it doesnt parse. Can anyone figure this out. I will include the code without the login information because the forum is public but I did put the words left out for you to see where I took out the passcodes. Code: [Select] <?php //This is the directory where images will be saved $target = "potofiles/"; $target = $target . basename( $_FILES['photo']['name']); //This gets all the other information from the form $price=$_POST['price']; $gig=$_POST['giga']; $yesg=$_POST['yesg']; $pic=($_FILES['photo']['name']); $pic2=($_FILES['phototwo']['name']); $pic3=($_FILES['photothree']['name']); $pic4=($_FILES['photofour']['name']); $description=$_POST['iPadDescription']; $condition=$_POST['condition']; $fname=$_POST['firstName']; $lname=$_POST['lastName']; $email=$_POST['email'] // Connects to your Database mysql_connect ("left out", "left out", "left out") or die(mysql_error()) ; mysql_select_db("left out") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO listing (price,giga,yesg,photo,phototwo,photothree,photofour,iPadDescription,condition,firstName,lastName,email) VALUES ('$price', '$gig', '$yesg', '$pic', '$pic2', '$pic3', '$pic4', '$description', '$condition', '$fname', '$lname', '$email')") ; //Writes the photo to the server if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } echo date("m/d/y : H:i:s", time()) ?> Hi folks, I am a complete n00b at php and mysql. I am teaching myself from books and the WWW, but alas I am stuck... the error I get is: Parse error: syntax error, unexpected T_STRING in X:\xampp\htdocs\search.php on line 7 here is the code: <?php mysql_connect ("localhost", "user", "password") or die (mysql_error()); mysql_select_db ("it_homehelp_test") or die (mysql_error()); $term = $_POST['term']; $sql = $mysql_query(select * from it_homehelp_test where ClientName1 like '%term%'); <<<------this is line 7 while ($row = mysql_fetch_array($sql)){ echo 'Client Name:' .$row['ClientName1']; echo 'Address:' .$row['Address1']; echo 'Phone:' .$row['Tel1']; } ?> Any help you can offer would be great. I can also post the ".html" file that creates the search bar if it is needed. Thanks I have been getting that error and I cannot figure out why it is happening Here is the error: Parse error: syntax error, unexpected T_ENDWHILE, expecting ',' or ';' in /home/scswc188/public_html/index.php on line 23 Here is my Code (Database Credentials removed for obvious reasons) <?PHP // Conect to the Mysql Server $connect = mysql_connect("IP","USER","PASS"); //connect to the database mysql_select_db("TABLE"); //query the database $query = mysql_query("SELECT * FROM users_online WHERE online = 1"); // fetch the results / convert into an array WHILE($rows = mysql_fetch_array($query)): $users = $rows['name']; echo "'<font color='black'>Online:<font color='green'>$users, </font></font>;" endwhile; ?> or here http://pastebin.com/ZYh4t2pD Thanks Edit: Found the php tag i keep getting the above error.. help this is a class of the log entry <?php require_once "config.php"; abstract class DataObject { protected $data = array(); public function__construct( $data ) { foreach ( $data as $key => $value ) { if ( array_key_exists( $key, $this->data )) $this->data[$key] = $value; } } public function getValue( $field ) { if ( array_key_exists( $field, $this->data )) { return $this->data[$field]; } else { die( "field not found" ); } } public function getValueEncoded( $field ) { return htmlspecialchars( $this->getValue( $field )); } protected function connect() { try { $conn = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD ); $Conn->setAttribute( PDO::ATTR_PERSISTENT, true ); $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); } catch ( PDOException $e->getMessage() ); die( "connection failed: " . $e->getMessage() ); } return $conn; } protected function disconnect( $conn ) { $conn = ""; } } ?> Hey, Its something to do with the ' or \ I know that as Ive been trying alot. Code Code: [Select] if ($this->isAdmin && count ($func_players) > SettingsManager::GetSetting(Settings::BAN_LIMIT)) return $this->sendErrorBox('max', 'You can\'t ban that many Users at once!', 'Gosh', 'iBan'); foreach($func_players as $func_player) $func_player->ban(&this->playerName, $this->isAdmin); return $this->sendErrorBox('max', sprintf( '%s ha%s been banned.' $this->getPlayerString($func_players), count($func_players) == 1 ? 's' : 've'), 'SykoPwns:P', 'Sykos:iBan'); Thanks for your help! Ive tried alot of things I think I could just take out the \ or something!! I just edited the tablerate.php in magento, and now I am getting this error, but I don't know what's wrong. Anybody here can help me?
The error message reads "Parse error: syntax error, unexpected '*', expecting function (T_FUNCTION) in /home/echoshom/public_html/app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php on line 50"
Attached is tablerate.php
Attached Files
Tablerate.php 9.23KB
2 downloads SET UP: Windows vista # XAMPP 1.7.3, # Apache 2.2.14 (IPv6 enabled) + OpenSSL 0.9.8l # MySQL 5.1.41 + PBXT engine # PHP 5.3.1 # phpMyAdmin After entering various different information from previous forms on different pages I finally get this error message "Parse error: syntax error, unexpected T_STRING in C:\blablah on line 31" on the following code: <?php //let's start our session, so we have access to stored data session_start(); include 'db.inc.php'; $db = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD) or die ('Unable to connect. Check your connection parameters.'); mysql_select_db(MYSQL_DB, $db) or die(mysql_error($db)); //let's create the query $query = 'INSERT INTO subscriptions (name, email_address, membership_type, terms_and_conditions, name_on_card, credit_card_number, credit_card_expiration_data) VALUES ( "' . $_SESSION[$name, $db] . '", ' . $_SESSION[$email_address, $db] . '", ' . $_SESSION[$membership_type, $db] . '", ' . $_SESSION[$terms_and_conditions, $db] . '", ' . $_POST[$name_on_card, $db] . '", ' . $_POST[$credit_card_number, $db] . '", ' . $_POST[$credit_card_expiration, $db] . ')'; if (isset($query)) { $result = mysql_query($query, $db) or die(mysql_error($db)); } ?> <p>Done!</p> </body> </html> ?> Any help would be appreciated. I'm practicing this with the ambition to develop a multi-page registration using sessions for a website so even web pages that might help me with this aim would be good. <?php error_reporting(E_ALL); include_once("conninfo2.php"); include_once('classes/bcrypt.php'); class User { private $_bcrypt; $this->_bcrypt = new Bcrypt; if($this->_bcrypt->verify($password, $this->data()->password)){ } if(isset($_POST['username'])) { $firstname = strip_tags($_POST['firstname']); $surname = strip_tags($_POST['surname']); $pnumber = strip_tags($_POST['pnumber']); $username = strip_tags($_POST['username']); $email1 = strip_tags($_POST['email1']); $email2 = strip_tags($_POST['email2']); $password1 = $_POST['password1']; $password2 = $_POST['password2']; //code below will make sure all fields are filled in if(trim($firstname) == "" || trim($surname) == "" || trim($pnumber) == "" || trim($username) == "username" || trim($email1) == "" || trim($email2) == "" ||trim($password1) == "" || trim($password2) == "") { echo "Error, all fileds need to be filled in"; $db = null; exit(); } //code below checks that the emails entered both match one another if($email1 != $email2) { echo "Emails do not match, please try again"; $db = null; exit(); } //code below matches the passwords entered else if($password1 != $password2) { echo "Passwords do not match please try again"; exit(); } if(!filter_var($email1, FILTER_VALIDATE_EMAIL)) { echo "Your email is invalid, please try again"; $db = null; exit(); } //checks if the email exists within the database $stmt = $db->prepare("SELECT email FROM login WHERE email=:email1 LIMIT 1"); $stmt->bindValue(':email1',$email1, PDO::PARAM_STR); try{ $stmt->execute(); $count = $stmt->rowCount(); } catch(PDOException $e) { echo $e->getMessage(); $db = null; exit(); } //checks if the username exists $usernameSQL = $db->prepare("SELECT username FROM login WHERE username=:username LIMIT 1"); $usernameSQL->bindValue(':username',$username,PDO::PARAM_STR); try{ $usernameSQL->execute(); $usernameCount = $usernameSQL->rowCount(); } catch(PDOExemption $e) { echo $e->getMessage(); $db = null; exit(); } //checks if the email is already within the database if($count > 0) { echo "This email already exists"; $db = null; exit(); } //checks the username if($usernameCount > 0) { echo "This username is unavailable please try another"; $db = null; exit(); } $user = new User; $bcrypt = new Bcrypt; try { $email1->create(array( 'username' => Input::get('username'), 'password1' => $bcrypt->hash(Input::get('password')), 'firstname' => Input::get('name'), 'surname' => Input::get('surname'), 'pnumber' => Input::get('pnumber'), 'email1' => Input::get('email'), 'ipaddress' => Input::get('ipaddress'), 'signup_date' => date('Y-m-d H:i:s'), 'group' => 1 )); //grab the last id used within the database $lastId = $db->lastInsertId(); $stmt3 = $db->prepare("INSERT INTO activated (user, token) VALUES ('$lastId', :token)"); $stmt3->bindValue(':token',$token,PDO::PARAM_STR); $stmt3->execute(); //email activation $from = "From Auto Responder @ Mediaedit <admin@mediaedit.com>"; $subject = "IMPORTANT: Please activate your account"; $link = 'http://mediaed.it/roxanne/activate.php?user='.$lastId.'&token='.$token.''; //email body $message = " Thanks for register with Mediaedit, before your able to use our services you will need to verify your email so that we know your human $link "; //headers $headers = 'MIME-Version: 1.0' . "rn"; $headers .= "Content-type: textrn"; $headers .= "From: Mediaedit"; //send email now mail($email1, $subject, $message, $headers, '-f noreply@mediated.it'); $db->commit(); echo "Thanks for registering, before you can us our services you need to activate your account an email has been sent which you will recieve shortly"; $db = null; exit(); } catch(PDOException $e){ $db->rollBack(); echo $e->getMessage(); $db = null; exit(); } } ?>i keep getting Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION |