Noob at PHP no idea.. it involves getting info from text fie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Fall0ut
Forum Newbie
Posts: 1
Joined: Sat Aug 25, 2007 12:27 pm

Noob at PHP no idea.. it involves getting info from text fie

Post by Fall0ut »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Ok so basically I am doing this subscribe thing for a newsletter on my site

The person inputs his email into the textfield, clicks submit... then the email gets saved somehow. Dont exactly know

I found this code on wikipedia

_____________________________________

form.html

[syntax="html"]<html>
<body>
<form action="form_handler.php" method="get">
User Name: <input name="user" type="text" />
<input type="submit" />
</form>
</body>
</html>
_____________________________________


form_handler.php[/syntax]

Code: Select all

<html>
<body>
<?php
/*
* This will print whatever the user put into the form on the form.html page.
*/

$name = $_GET['user'];
echo "Hello, ". $name ."!";
?>
</body>
</html>

_____________________________________


I just dont exactly know what to do with the PHP

I dont exactly understand how the HTML part knows were to send the inputed information

Please help out! Thanks!


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Normally, you would store this information into a database like MySQL, PostgreSQL etc.
If you are so new to php and html and want a newsletter system on your site, then I suggest you first try deploying phpList - an open-source newsletter management system which'll save you a load of time.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

anjanesh wrote:Normally, you would store this information into a database like MySQL, PostgreSQL etc.
If you are so new to php and html and want a newsletter system on your site, then I suggest you first try deploying phpList - an open-source newsletter management system which'll save you a load of time.
I wholly agree with anjanesh! There's nothing wrong with being a newbie--we all were, once--but for a newbie to step right into a somewhat advanced application the first time is usually a mistake. You will likely spend a lot of time and maybe screw up your operation. Find a pre-scripted solution--there are lots of them out there. Then try working from the simplest PHP operations if you want to learn PHP.
Post Reply