same querie, or a new one??
Posted on
16th Feb 2014 07:03 pm by
admin
Hi guys,
I'm still working on this drop down list. I've got the actual drop down list to work (call all the "pname"s from the table, and I've even found how to print the result once you press submit.... However...
What I need for this to do is once pname has been selected and submitted, I want the information linked to the pname in other tables to also display...
SO the question is: Do i add the other information I need into the original query, or will it be easier to do another one?? And if the latter, how and where??
Thanks
Gem
Code: <?php
$conn = mysql_connect("CNX") 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']);
}
?>
No comments posted yet
Your Answer:
Login to answer
232
24
Other forums
using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&
SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance
date function help
i need help with date function
Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H
wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH
how to transport the Query and insfoset
Hi
I have created the query using SQ01........
How to created T-code for query..
Give me all your tricks for minimizing jar file size
Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w
TemplatePower & AJAX
Hi all,
I'm currently implementing some AJAX features in my PHP-framework (which is b
How to show more than 1 users with this code...
Hello,
i have a table that shows users only if I, as Administrator, want to be shown. But its sho
Material xxx does not exist in plant xxx
Dear All,
I am working for a steel project which is repetitive manufacturing.
Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun