Jump to content

[SOLVED] Another pair of eyes needed (unexpected T_CHARACTER, expecting T_STRING ...)


Gnub

Recommended Posts

I've looked at this for around 30 min, can't seem to figure out where the problem is.

 

echo "<TR><TD><a href=CreateQuote.php?Offer=$row[\"Row_No\"]Day=$row[\"revised_date\"]FromA=$row[\"Departure\"]ToA=$row[\"ArrivalPoint\"];>Quote</a></td>";

 

What this is doing is putting fields into a URL for another page.

 

thanks in advance.

When putting array references into a quoted string you either have to use concatenation or curly braces. The following shows using concatenation:

<?php
echo '<TR><TD><a href="CreateQuote.php?Offer=' . $row['Row_No'] . '&Day=' . $row['revised_date'] . '&FromA=' . $row['Departure'] . '&ToA=' . $row['ArrivalPoint'] . '">Quote</a></td>';
?>

 

I also fixed the "href" contents.

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.