select name=OrgName[] size=5 id=OrgName
?php
//connecting to the database
$link = mysql_connect(localhost,lodestone,trypass);
if ($link){
Print ;
} else {
Print No connection to the database;
}
if (!mysql_select_db(catapult_com)){
Print Couldn't connect
be carefull with the results of mysql_fetch_array, array names are DB
field names, for easier access =)
?php
//connecting to the database
$link = mysql_connect(localhost,lodestone,trypass);
if(!$link)
Print No connection to the database;
if
$Organisation[1] is always going to be empty because you're only
selecting one item per row from the DB
SELECT OrgName
If you want the same output in both places, just do this...
echo ( option value=\$Organisation[0]\$Organisation[0]\n );
Denis L. Menezes wrote:
select name=OrgName[]
Thanks Maciek.
With the code that you gave me, I am getting the error :
Parse error: parse error in
/usr/local/www/virtual2/66/184/35/184/html/findresults.php on line 114.
My lines are as follows :
$content.= option
value=\.$orgData['OrgName'].\.$orgData['OrgName']./option\n);
Can u help me a
Closing parenthesis...remove it.
Denis L. Menezes wrote:
Thanks Maciek.
With the code that you gave me, I am getting the error :
Parse error: parse error in
/usr/local/www/virtual2/66/184/35/184/html/findresults.php on line 114.
My lines are as follows :
$content.= option
I assume you want the array populated with something other than the
display name in the select, so I've made up OrgId as a field name in
your database. How 'bout something a little easier to read, using a
more consistent style?
?php
if (!$db=mysql_connect(localhost,lodestone,trypass))
6 matches
Mail list logo