user2034544
user2034544

Reputation: 21

unexpected T_STRING on first line of code

I have been getting an error saying unexpected T_STRING on line 2 of this script:

<? php
session_start();
$incidentKey = $_SESSION['incidentKey'];
$incidentDetailsQuery = mysql_query("SELECT * FROM incidents WHERE incidentKey='".$incidentKey."'");
while ($incidentDetails = mysql_fetch_assoc($incidentDetailsQuery);
?>

And despite looking through the forum heaps, I have had no luck. This was even coming up as an error saying unexpected T_STRING on line 2 when I the code started like this:

<? php
$incidentKey = $_SESSION['incidentKey'];
etc.....

I've gone through all other includes and couldn't find any missing terminators leading up to this script. Can anyone think why else I would be getting this error?

Upvotes: 1

Views: 116

Answers (1)

roullie
roullie

Reputation: 2820

Remove the space in

  <? php 

to make it

  <?php

Upvotes: 1

Related Questions