Unexpected T_Variable ?
Posted on
16th Feb 2014 07:03 pm by
admin
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on line 42 "$sql="select pname, award, aw_year" but I dont know why its a problem?? Can anyone help me understand what I am doing wrong please??
Full code below:
Did you know?Explore Trending and Topic pages for more stories like this.
Code: <?php
$conn = mysql_connect("CNX INFO") or trigger_error("SQL", E_USER_ERROR);
$db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
$sql="SELECT pname FROM pname ORDER BY pname";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["pname"];
$thing=$row["pname"];
$options.="<OPTION VALUE="$id">".$thing.'</option>';
}
?>
<html>
<body>
<FORM action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<SELECT NAME=pname>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>
<input type="submit" name="submit" value="submit">
</FORM>
<?php
if(isset($_GET['submit'])){
print stripslashes($_GET['pname']); //this is where i need to get the rest of the information to display//
//
}
$pname=$_GET['pname']
$sql="select pname, award, aw_year
FROM pname, aw_result, award
WHERE pname.name_id=aw_result.pname_id
AND award.award_id=aw_result.award_id
AND pname='$pname'
ORDER BY aw_year";
$info=mysql_query($sql1);
echo $info?>
</body>
</html>
No comments posted yet
Your Answer:
Login to answer
260
12
Other forums
A Few Questions
Hi, I want to ask a few questions that I can't seem to find..
1) I'm creating a "shortcu
please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda
HTML Viewer HIDE scrollbar
How can I disable scrollbars in a HTML Viewer control? I can't hide them. Even i have enough space b
Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t
How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php
Thanks in advance
How can I uploading Transactional Data from Legacy to New SAP system
Hell Gurus,
I am overwhelmed with questions on how to migrate huge volume of Sales Orders
media recovery
Hi,
i startup the database i got the error
SQL> startup
ORACLE instance started.
Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt
Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.
cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a d