Passing Variables to new php pages

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
Anarking
Forum Newbie
Posts: 24
Joined: Wed Feb 11, 2009 11:29 am

Passing Variables to new php pages

Post by Anarking »

hi there


Im trying to create a little script that allows me to create a Form from a few pre chosen options


for example

Ill have a Name for each line, the type of input (text area, Drop Down Menu, radio boxes etc) and the options for the selection if need be


say I have ten or so lines in the form

how will I pass these from one php file e.g. createform.php

to another php file like form.php which will be the actual form they wanted


I was thinking of using Post & get and turning each row into a variable e.g.

row1 = ("name", TEXTAREA,);

but this seems unweilding, is there a better way to do it?
worldnet
Forum Newbie
Posts: 4
Joined: Tue Feb 03, 2009 7:26 pm

Re: Passing Variables to new php pages

Post by worldnet »

Using post and get could accomplish passing of variable from php page to another php page ex. $_POST['name'] or $_GET['name']. And if you mean to pass an HTML tag to other php page you could do templating ex: $radio = "<input type="radio" name="" />";
Post Reply