REVISED; need INSERT help

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

 



hello again and i am sorry i was not more specififc in my last post.
here is where i am confused:
else { $today = date("Y-m-d h:m:s");
$sql = "INSERT INTO ads ("") VALUES
('$first_name','$last_name','$email','$phone','$univ_status',
'$password','$today')";
mysql_query($sql);
$auth="yes"; $logname = $email;


for the actual insert, what do i put in order to avoid having to do a separate .php for each form and list the fields/values from each form? thanks and sorry again. addison


previous post:


hello,
can someone help me with this? i have tried all i know and i am very new at this... my apologies.
i am trying to have multiple forms, all with different fields/values, point to one .php that will foreach($HTTP_POST_VARS as $key => $VALUE)
1) check for if ($value == "")
2) ereg function
3) $$key = strip_tags(trim($value));
4) $today = date("yyyy-m-d");
5) $sql = "INSERT INTO tablename ("$HTTP_POST_VARS)
VALUES ('$$HTTP_POST_VARS values')";
mysql_query($sql);

the problem i am having is i have so many different form fields/values. i am almost resigning to having one .php for each form but i know there is a better way. and... anyway... thanks for looking at this. best regards, addison
--
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