Jump to content

Recommended Posts

here is the full code

 
<?php 


  $con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("clients", $con);

echo '".($_POST['email'])."'; 

?>

 

im getting error Parse error: parse error, expecting `','' or `';'' in C:\wamp\www\homepage\google.php on line 150

which is that original line i posted

 

also here is where im getting "email" from

 

<?php

$extract = mysql_query ("SELECT * FROM members ORDER BY `date` DESC");
$numrows = mysql_num_rows ($extract);

echo"Select USER: <select name='email'>";

while ($row = mysql_fetch_assoc($extract)) 
  
{
  echo '<option name="'.$row['firstname'].'('.$row['date'].')">'.$row['firstname'].' ('.$row['date'].')</option>';
}      

?>

echo '".($_POST['email'])."';

 

That is not proper syntax. Fix that to this:

echo $_POST['email'];

 

As stated earlier, or if you want the quotes to also be echo'ed out:

 

echo '"{$_POST['email']}"';

 

But yea, that was the error, you just had improper syntax so of course it would throw a syntax error. You may want to read more up on PHP Syntax to help you avoid this in the future.

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.