Syntax error?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ron_e
Forum Newbie
Posts: 13
Joined: Tue Sep 15, 2009 11:59 pm

Syntax error?

Post by Ron_e »

I want to match this number (APXI12345611) against an ID on the MySQL db. But it won't work!!

Code: Select all

<?php
$link = mysql_connect("localhost","inmy","inmypasw01");
mysql_select_db("inmy_dyomails");
 
$query = 'SELECT * FROM dyomails';
$results = mysql_query($query);
 
echo "<?xml version=\"1.0\"?>\n";
echo "<dyomails>\n";
 
   $SomeVar = "APXI12345611";
 
   $query = "SELECT * FROM dyomails WHERE ID = '$SomeVar'";
   $results = mysql_query($query);
      if($line = mysql_fetch_assoc($results)) 
   {
      echo = "<item>" . $line["Email"] . "</item>\n";
}
 
echo "</dyomails>\n";
mysql_close($link);
 
?>
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Syntax error?

Post by jackpf »

echo = "<item>"
?????

Turn on error reporting.
Post Reply