submittion and retrieval
Posted 03 June 2006 - 11:08 PM
Ive been playing around with html for a few years now and know the very basics to put a page together. Recently i have also been playing around with PHP...such a handy tool.
Anyway, im looking for a way to make a text box, on a php page, where people can type in a link to a webpage, then when they press the submit button, it adds it to a text file or something similar (not MySQL).
Once its in this file i would like to know a way of viewing the text from it, in the body of another php page....ive tried several things but with my limited knowledge, have not come up with anything.
Thanks in advance,
Posted 04 June 2006 - 01:39 PM
You should be able to make modifications to this script to help you. When writing to the file, you probably need to use:
<a href='".$_POST['link']."'>".$_POST['name']."</a><br />
Where the POST values are taken from the form. You need to name the textboxes 'link' and 'name' ans set the form action to the PHP file location.
Posted 04 June 2006 - 03:52 PM
$data = '<a href="' . $_POST['link'] . '">' . $_POST['name'] . '</a><br />'; $file = f.open('file.htm', 'a+'); f.write($file, $data); f.close($file):
(remove the dots from f.open, f.write, and f.close)
Important note: The file must be properly CHMOD'ed
Posted 11 June 2006 - 03:11 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users