Welcome to WebmasterWorld Guest from 18.104.22.168
What I basically want to do is to have a text box in a form, with a "submit" button next to it.
What will happen is that the user will type in a URL in the textbox, and press submit. That form then writes that URL to the original page, providing a link to the given URL.
The problem that I can foresee is that when the user refreshes the page, that link that was uploaded would disappear. But I don't want this to happen.
I hope I made myself clear, and I would really appreciate it if anybody could help!
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
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.
<?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