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...
Did you know?Explore Trending and Topic pages for more stories like this.
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
Help with syntax
Hi all!
The $bridge variable is not getting passed while it is contained in the line below:
=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim
chat
hello i'm amir
i need a chat source code in asp.net 2.0 without Ajax.
anybody can help me?
IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST metho
socket makes browser hang...
I have a socket server, and I am having a problem at the moment...
A browser sends a http hea
this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my
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
Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming
Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t
Pass sql into pl/sql and create RMAN duplicate script.
Hi,
I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma