Creating a Form

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
newbtophp
Forum Newbie
Posts: 3
Joined: Wed May 27, 2009 12:01 pm

Creating a Form

Post by newbtophp »

Im trying to create a form which will fill in the variables in the config.inc.php, but I can't get it complete, the form fields are meant to replace the "text goes here", heres the code below:

Heres my form.php:

Code: Select all

<?php include("config.inc.php"); ?>
<form>
 
Website Url: (this edits $site_title)<BR>
 
<input type="text" name="url" size="25"><BR><BR>
 
Website Title: (this edits $siteurl)<BR>
 
<input type="text" name="title" size="25"><BR><BR>
 
Email: (this edits $email)<BR>
 
<input type="text" name="email" size="25">
 
<BR>
<BR>
 
<input type="submit" value="Submit">

Heres my config.inc.php:

Code: Select all

//Basedir
$siteurl = "text goes here";
//Website Name
$site_title = "text goes here";
//Your Email
$email = "text goes here";

Can anyone please help?
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: Creating a Form

Post by akuji36 »

Config inc looks a lot like one of php's basic config files.

I'd change the name of your php script to something else
so php does not get confused like: send_me.php

follow this link:

http://www.phpeasystep.com/phptu/8.html
Post Reply