TonyKr Posted December 3, 2003 Share Posted December 3, 2003 I have a question that I believe is more related to OSC abstraction of PHP and not PHP itself. It appears possible to pass a variable through a link with POST, much like doing so with GET. I understand how to send the parameter using the tep_href_link function, but I do not see how you receive it and store it in a variable on the receiving php page. How does one receive a parameter (and store it in a variable) which has been passed through a link to a page that is already set up as a method='POST'? tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) Tony :o :o Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2003 Share Posted December 3, 2003 Tony, I am new to php and html, but as you dont have any other replies at the moment maybe this will help... The file you open ( in action =xxxx.php) recieves the names of the input areas you create (using name=xxxx) in the input form as variables preceded with a $. eg if you create a an input area call myname, the receiving php code would pick this up as $myname when it is opened using the form action Variables can be passed using URL links by adding (eg) ?myname=chris at the end of the link the page you open would refer to $myname as above, each variable is separated by a & . The tep_href_link function creates this html code for you, so you would add this as $page='xxxx?myname=chris', $parameters='',..... Not sure if this helps, I'm sure somebody else can help more... Chris. Link to comment Share on other sites More sharing options...
TonyKr Posted December 4, 2003 Author Share Posted December 4, 2003 Chris, Thanks for the response. It was my understanding that appending the URL (~.php?name=value) only works with method='GET'. Is this not the case? The file I am trying to modify is based on the file "account_edit.php" which uses method='POST'. Thanks again. Tony Link to comment Share on other sites More sharing options...
TonyKr Posted December 4, 2003 Author Share Posted December 4, 2003 Chris, I believe I have fixed the problem. I created a separate variable for the 'method=get' parameter. Previously, I was using the same variable name (actually the same variable) that already existed for 'method=post'. I was not sure if one can use 'get' variables in the same file with 'post' variables, but appearently so. I will have to do more testing to make sure it is working properly. Thanks again for your input. Tony Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.