| 11:20 am on Feb 19, 2006 (gmt 0)|
you could try writing the url to a cookie or a session variable and then fetching the info using php - have a look on google for 'php sessions' or 'php cookies'
the session would last as long as the visitor has his browser window open
the cookie would last as long as you set it to last
hope this helps
| 11:33 am on Feb 19, 2006 (gmt 0)|
I was actually considering using cookies.
But is there no way to write the link into the actual html of the original page when the user clicks the button?
| 10:27 am on Feb 20, 2006 (gmt 0)|
Can anyone else help...please?
I realised that considering forums can do it, there must be a simpler way to do it. Based on the forum scripts.
| 11:14 am on Feb 20, 2006 (gmt 0)|
cookies, sessions or write to db - only way to maintain it (cant think of anything else) choose one and plan your page/code
| 11:31 am on Feb 20, 2006 (gmt 0)|
What do you mean by writing to db? is that a Database?
| 11:38 am on Feb 20, 2006 (gmt 0)|
>>But is there no way to write the link into the actual html of the original page when the user clicks the button?
yes of course there is.
search for something like: editing text file php
basically your html page is the text file, submit the form to a php page that gets the form value, opens the text file, adds the url to the text file, closes the text file and finally redirects the user to the html page.
much simpler than it looks once you start.
| 11:49 am on Feb 20, 2006 (gmt 0)|
topr8 u are correct, text file may be the solution to this problem :) i have forgotten it (dont use it too often myself)
| 1:20 pm on Feb 21, 2006 (gmt 0)|
thanks. i'll search on google or something for that and start learning :)
| 3:19 pm on Feb 21, 2006 (gmt 0)|
Why not use GET to append the URL as a variable onto the end of the original URL like:
<?php echo "<a href=\"$url\">$url</a>";?>
<form action="" method="get">
<input type="text" name="url"> <input type="submit" value="Submit">
Now when the page is refreshed, the variable remains on the end of the original URL like: mydomain.com/index.php?url=example.com