Page 1 of 1

Passing Variables to new php pages

Posted: Thu Mar 05, 2009 9:56 am
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?

Re: Passing Variables to new php pages

Posted: Thu Mar 05, 2009 10:15 am
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="" />";