logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Painting
Heart Disease
Horror Literature
Dating
Hiking & Backpacking
SF/Fantasy Books
Healthy Foods


dailyclick
All times in EST

Full Schedule
g
g PHP Site

BellaOnline's PHP Editor

g

Personal Activities Calendar Program - Printing The Web Form With A Function - 2

Guest Author - Diane Cipollo

To make the program easier to maintain, let's put the code for this function in a separate file. Let's call that file ActivityEntryForm.php3 and let's call this function Activity_Entry_Form( ). Here is the beginning of the function code.

function Activity_Entry_Form( )
{ echo statement }

Now we need to add the echo statement.

function Activity_Entry_Form( )
{
echo "
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
...
<form>
...
</form>

</body>
</html>";
}

That's all for now, save your file as ActivityEntryForm.php3.

Now we need to go back to our original ActivityEntry.php3 file and make some changes. Remember that we need to remove the echo statement and replace it with the function call for the Activity_Entry_Form( ) function. We also need to add a require_once statement to include the ActivityEntryForm.php3 file. Here is the finished changes to the ActivityEntry.php3 file.

require_once('ActivityEntryForm.php3');

if(empty($_POST['submit']))
{
Activity_Entry_Form( );
}

← Back






This site needs an editor - click to learn more!

Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Twitter Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Facebook Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to MySpace Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Del.icio.us Digg Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Yahoo My Web Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Google Bookmarks Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Stumbleupon Add Personal+Activities+Calendar+Program+%2D+Printing+The+Web+Form+With+A+Function+%2D+2 to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the PHP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor