I would like to find out how to generate and call this link âhttp://example.cgi?client=public&&quicksearch=test&&scale=25000â using PHP and to specify âtestâ from the user inputting the word âtestâ in a PHP generated textbox. This is what I have got so far.

I call ref_1.php and click the link which calls ref.php Itâs the text box, the order of setting the cookie and the header that I am having problems with. Can it be done just using PHP or should I look at javascript?

thanks,

Dom

Last edited by domuk on Mon May 24, 2004 5:14 pm, edited 1 time in total

DanielTeam Member

Joined: 06 Jan 2002
Posts: 2564

Posted:
Sun May 23, 2004 1:53 pm (13 years, 10 months ago)

Shouldn't this

Code:

$combind = $a . $grid_ref . $b;

be changed to this?

Code:

$combind = $a . $ref . $b;

________________________________

domukWebHelper

Joined: 15 Jan 2004
Posts: 91

Posted:
Mon May 24, 2004 5:12 pm (13 years, 10 months ago)

sorry, you are correct. I use to call it grid_ref and I must have mistyped it in my post.

I can get it to pass 'test' to the ref.php file (via a cookie) and then send it to the cgi script (which works), but I can not manage to write the cookie after the user has been presented with the form (html form generated with php).

In essence the problem is that I have to send the cookie and the
headder($combind); before any html is sent to the browser.

Any Ideas Daniel?

DanielTeam Member

Joined: 06 Jan 2002
Posts: 2564

Posted:
Mon May 24, 2004 6:07 pm (13 years, 10 months ago)

Sorry, I don't understand your question; specifically this part:

Quote:

but I can not manage to write the cookie after the user has been presented with the form (html form generated with php).

________________________________

domukWebHelper

Joined: 15 Jan 2004
Posts: 91

Posted:
Mon May 24, 2004 7:15 pm (13 years, 10 months ago)

As I understand it you have to write the cookie before any HTML is sent to the browser otherwise you get an error eg:

I am not sure how to do page 1. I would like to get to stage 7 before I submit page1.php. I am not sure if this is possible in two php documents
I think I need more, but I am unsure how to split the operations.

I think I need so see some examples of data being passed from server to browser and back again in one php document or I need to see a dynamically staged construction of a html form with a php document.

Do you understand what I am asking?

I am sorry for confusing you, I am trying to get my head round php without knowing fully what it can do.

Thanks for your help,

I really appreciate it,

Dom...

DanielTeam Member

Joined: 06 Jan 2002
Posts: 2564

Posted:
Tue May 25, 2004 5:21 pm (13 years, 10 months ago)

If I understood correctly, you want to know how to pass data between pages?

If so, you should put the values of the previous page into hidden <input> fields to keep their values when submitting:

You cannot post new topics in this forum.You cannot reply to topics in this forum.You cannot edit your posts in this forum.You cannot delete your posts in this forum.You cannot vote in polls in this forum.