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>
first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete/update button, etc. the problem is I can't make it show the first value inserted in the db, it only
retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell the images are stored but getting them out seems to be the problem. when i try to go to the page on
login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it to different web page depending on the username and password used in logging in... thanks!
foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and whittle down to a few select stocks. I'm currently doing this with vb, but I'm wanting to get it
understanding functions and classes
Code: [Select]class person { var $name = "Jimmy Goe"; function get_name(){ echo $this->name; }} I am playing with this very small script that I made using a
remove innitial
and
tagsi am using tiny_mce as a text editor for my CMS.buy now the problem is it add <p> tag with dataso while retrieving the data for front end i get an extra space. so there is any why that i
Character Sets/Collations Stuff
Can someone please give me a check list of things I must do to setup all the charset stuff for my php/mysql social site*only for a USA town doesn't require non english characters*
Sessions Value Not Saved
Hi,Im making a login form and im using this code:Code: if($login=="true"){$_SESSION['mlvl']=1;if($username=="admin"){$_SESSION['admin']=1;}else{$_SESSION['admin']=0;}}but when the
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website membership from on their computer. He's afraid that the users might share their login's with their
Basic Question Regarding PHP Includes
HiJust starting out with PHP.Working on a site that uses some basic includes, these are working fine for all my files in the root of my site as the links from the header include is just linking