This topic is locked

href syntax

4/23/2008 9:16:33 AM
PHPRunner General questions
I
iripais author

I have a product_list.php that displays the list of products.

This list of products is linked to a table, wich is tha master table, and it has a foreign key called "id_product"

In the orders_list page, there is a lookup link to that id_product ans the data is called when I choose the product.

How can I create a link in each row, form the product_list.php that opens the order_add.php table with the same id_product of the row I was in?

J
Jane 4/23/2008

Hi,
try to use this code:

<a href="orders_add.php?productid={$row.1id_product_value}">Link</a>


Then check URL parameter in the Add page: Before process event and save it in the $_SESSION variable. You can use this $_SESSION variable as default value on the "Edit as" settings dialog on the Visual Editor tab.

Here is a sample:

if (@$_REQUEST["productid"])

$_SESSION["productid"] = @$_REQUEST["productid"];

I
iripais author 4/23/2008

Not workin Jane <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=28435&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
It returns this:
orders_add.php?productid=

J
Jane 4/23/2008

Please make sure id_product field is on the list page.
If it doens't help publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages.

I'll find what's wrong with your project inspecting it at Demo account site.