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>
Call Screen statement Error
Dear Experts,
Mail sending is slow on server
Why mail is taking time to be send on apache-linux server
Help with page encoding issue and weird characters
I'm trying to write a screen scraper and when I pull out the lines of the html file that I'm interested in and put them in a variable, I end up with a few extra weird characters in my string that I
Pagination won't carry results past page 2.
Hi all,I've worked out my pagination script and its paginating fine until I click next from page 2 at which point it stops displaying results. I know its something really simple, but can't see what
how can i expire the submitted page using session.
hi,i'm new to php world.i'm using "post" method.when i submit it,data goes to database successfully.BUT when i click the back button of browser(IE) the previouspage will appear.how can i
Namespace Problem
I'm having problem with a section of code with a variable namespace.This code works fine:Line number On/Off | Expand/Contract $c = new \Apps\Admin\Views\Index; However this code does not:Line number
Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I am coding a registration form. I ask the user a Yes/No question. Depending on the answer I have an
database design
Hi,I got a page which allow candidate to type in their previous working experience,I let user to choose the start date and end date and then system will automatically calculate the total experience in
Retail terminologys not been altered after activing Retail System
Hi, All
delete comma
HI,How to delete "," at the end of the string.Code: $match = 2009/02/03/a2correx03cvbnm,echo preg_replace("/;$/", "HI", "$match");