Re: empty query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



first, i must apologize as i am very new at this... and... i really appreciate your help. addison

On Sunday 26 January 2003 16:14, Addison Ellis wrote:

Please do not top-post.
Sorry here...


 i added this: {
 echo "$key, $value<br>";
 }
 underneath function storeForm($formdata,$ads) and it is now displaying
 this: year, 1971
 make, chevy
 model, impala
 color, green
 mileage,
 condition, none
 price,
 other, Ad may not exceed 25 words.
 contact, addison@bellsouth.net
 next_, Submit Your Ad
But this contradicts your initial assertion that you wasn't able to echo any
values from $formdata?
correct... i am able to echo values again.


 which is what i entered into the form except it is not passing the
 category, subcategory info that was selected from the two previous
 pages.
From _TWO_ previous pages? How are you carrying forward the values category &
subcategory? If you're not carrying them forward then it shouldn't come as a
great surprise that they're not available in the latter pages. You need to
pass those values along either using hidden field elements in your form or by
placing them into session variables.
i had the following to carry forward cat and subcat values:
<?
session_start(); if (@$auth != "yes")
{
header("Location: login.php");
exit();
} include("config.php");
$scobj = mysql_db_query($dbname,"select * from subcategory where id=$subcategory")
or die (mysql_error());
$scrow = mysql_fetch_object($scobj);
$cobj = mysql_db_query($dbname,"select * from category where id=$scrow->category")
or die (mysql_error());
$crow = mysql_fetch_object($cobj);
$sql = "SELECT first_name,last_name FROM accounts WHERE email='$logname'";
$result = mysql_query($sql)
or die (mysql_error());
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
extract($row);


 and, in the table the data goes into needs to have a category
 and subcategory id.

 also, i don't know why i am getting the
 next_,Submit Your Ad values passed.
I would hazard a guess and say that "next_" is the name of a button and
"Submit Your Ad" is it's value? As it is part of the form and you're
programmatically (or indiscriminately) extracting everything from $_POST (or
equivalent) then that is why you end up with it.
how am i to get rid of it.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
You have an ability to sense and know higher truth.
*/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux