Forum Moderators: coopster

Message Too Old, No Replies

Basic mysql/php table functions

need some help!

         

rivi2k

3:26 am on Nov 18, 2004 (gmt 0)

10+ Year Member



Hi all,im fairly new to php development and have been looking for some information on the following however i havent really been able to find any tutorials;
I have data entered in through a form, and I want to dynamically generate a content page for each new listing, and have the title clickable to that page...
i guess something like exactly the form i am filling in now!

I was just wondering what the necessary structure/statements would be, or any site where i could find a tutorial

thanks in advance :)

baertyp

10:18 pm on Nov 18, 2004 (gmt 0)

10+ Year Member



Sounds a bit like a shoutbox to me. Basically what you should take a closer look on is forms processing.

$_POST is the predefined array to access the user-entered form data. If you define a form like

<form action="process.php" method="post"> 
<input type="text" size="30" name="title">
<input type="submit" value="Send">
</form>
then after submitting the form a line like
<?php echo $_POST['title'];?>
in process.php would print the value the user typed into your text input field.

See the documentation at [php.net ]

Whether you stick the input into a database or a flat file depends on the amount of entries you expect. In terms of scalability I'd always prefer a database approach. Be sure to check the input for malicious bits and pieces, as it is user input you cannot trust.

Regards
Markus