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:
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
Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now
Can anyone give me some link on .htaccess tutorial
i wish to have friendly url using .htaccess, but no idea yet about this
Hope that anyone cou
Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what c
Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi
checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou
Problem with PHP code- simple contact form
Hi Folks,
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a co
strptime() equivalent for php4 ?!
Greetings!
this is my first post, thank you in advance for your replies.
Well, the ti
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne
Prevention Help
How can I use PHP or any other language (feel free to move this thread) to prevent users doing scree
uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f