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
! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement
C - Reading a file into a byte array
Hi,
I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru
Help with simple query
Hi,
I'm trying to do a Query with a Union where I want to print the number of rows $tc conta
Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit
parsing error
can anyone explain this syntax error:
Parse error: syntax error, unexpected T_IF
The e
Update Database
Hi All,
I have a problem with this:
Code: [Select]<?php
session_start();
Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but
Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)
get the country of visitor and display content based on that
Hello all,
I have seen that Google analytics can tell you where a visitor is coming from and
Validation
Hello
I know this is a really vag question.
I need to have a input field on a form th