Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
PHP
Array And Post In Php
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
dangutm
New Member
Join Date:
Feb 2007
Posts:
4
#1
Array And Post In Php
Mar 29 '07, 09:31 AM
1.How can i save all my variable in ane array and post then once
2.How can i call eg list of country from database and make it drop down menu
ak1dnar
Recognized Expert
Top Contributor
Join Date:
Jan 2007
Posts:
1584
#2
Mar 29 '07, 10:09 AM
I am not sure about your #1 question.
try this for #2
[PHP]<?php
require '../dbcon.php';//Database con string
$query = "SELECT p_id FROM products";
$result = mysql_query($qu ery) or die('Error, query failed');
$count = mysql_num_rows( $result);
if ($count > 0)
{
echo '<select name="item">';
while($result_r ow = mysql_fetch_arr ay($result))
{
echo '<option value="'.$resul t_row[0].'" >';
echo ($result_row[0]);
echo '</option>';
}
echo '</select>';
}
else
{
echo "There are no project numbers in the system";
}
?>[/PHP]
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment