Old 27-04-2004, 10:51   #1 (permalink)
deliben
Registered User
 
Join Date: Apr 2004
Posts: 7
Unexpected T_STRING !!!

1: if (mysql_num_rows($result) > 0)
2: {
3: echo '<p align="center">';
4: echo 'Select a customer:<br/>';
5: while ($row =mysql_fetch_assoc($result)):
6:
7: echo("<go href=\"detail.php?".SID."\">".$row ['fname']." ".$row['lname']." method="post">");
8: echo("<postfield name="rid" value=".$row['ID']."/>");
9: echo("</go>")
10: endwhile;

}

Hello ,

I am working with PHP and WML and I get to line 7: always an error called unexpected T_STRING what is wrong there I can not recognize it can you please help me out ?
  Reply With Quote
Old 27-04-2004, 10:58   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
You need to escape your quotes with backslashes.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 27-04-2004, 11:04   #3 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
But your structure needs sorting too. And you're missing a couple of quotes.
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 28-04-2004, 04:02   #4 (permalink)
deliben
Registered User
 
Join Date: Apr 2004
Posts: 7
Quote:
Originally Posted by smallbeer
But your structure needs sorting too. And you're missing a couple of quotes.

Hi,

I am a newbee what php is concerning can you please show me how to do it correctly ?

I can´t find anything in the manuals...
  Reply With Quote
Old 28-04-2004, 04:11   #5 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
Code:
echo("<go href=\"detail.php?".SID."\">".$row ['fname']." ".$row['lname']." method=\"post\">"); echo("<postfield name=\"rid\" value=\"".$row['ID']."\"/>"); echo("</go>");

But you have a closing > inbetween SID and fname. Should that be there?
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 28-04-2004, 04:57   #6 (permalink)
deliben
Registered User
 
Join Date: Apr 2004
Posts: 7
Quote:
Originally Posted by smallbeer
Code:
echo("<go href=\"detail.php?".SID."\">".$row ['fname']." ".$row['lname']." method=\"post\">"); echo("<postfield name=\"rid\" value=\"".$row['ID']."\"/>"); echo("</go>");

But you have a closing > inbetween SID and fname. Should that be there?

I want to build a link with ".$row ['fname']." ".$row['lname']." and this link should be forwarded to detail.php. With > I can name the link I asumed , at least that was the case with
echo("<a href=\"detail.php?rid=".$row['ID']."\">".$row['fname']." ".$row['lname']."</a>");

Now you say it is a closing tag I am confused !!!
  Reply With Quote
Old 28-04-2004, 05:09   #7 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,236
Quote:
Originally Posted by deliben
Now you say it is a closing tag I am confused !!!

OK but if you actually look, you'll see that you have a > after method="post" too.

You've also got <postfield> nested inside the <go> tag.

Code:
echo("<go href=\"detail.php?".SID."\" method=\"post\"">".$row ['fname']." ".$row['lname']."</go>");
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8