Jump to content

Cloning a form in a array of other forms with submit buttons!!!


valency

Recommended Posts

$SCREEN = new DataScreen($_REQUEST["SCRID"]);

 

if(isset($_REQUEST["submit"]))

{

switch ($_REQUEST["submit"])

{

                case "add":

SaveScreen();

DisplayList();

break;

case "set":

$SCREEN->SetAgeRange($_REQUEST["agS"], $_REQUEST["agE"]);

$SCREEN->SaveScreen();

DisplayQuestions();

break;

case "Delete":

$SCREEN->DeleteAnswer($_REQUEST["ANID"]);

DisplayQuestions();

break;

                case "view":

DisplayQuestions();

break;

                case "new":

DisplayNewScreen();

break;

case "Clone":

 

//trying to write a function that copies what happens exactly in (case "new")function  by select all from database and then displaying again on the page as well as inserting this new info in database, display list ()will certainly do this...so help with this cloning using the information hidden in the input type=hidden value=<?$scrid?>

DisplayClonedScreen();

 

DisplayList();

break;

 

 

              //now to the clone function itself

                    DisplayClonedScreen()

{

   

//copy everything from DScreen db into a new row

$sql = "SELECT * from DScreen WHERE ID = ".$_REQUEST["SCRID"];

$res = mysql_query($sql);

if ($res)

{ echo "eureka Ive each unique data returned from the database </br>";

$row = mysql_fetch_array($res);

        //getting the scrID returned here unique to each result but do not know how to display this result like a new screen AS the function DisplayNewScreen function does....I need to clone the results....to replicate each of the screen if and when the clone button is hit...pls help..if u get what Im saying.....(how to clone a form in a list of array of many forms with different IDs )

 

I'm going to say what everyone reading this article is thinking...

 

What the hell are you on and where can I get some?

 

Can you please calm down and reform your thoughts in to something more coherent?

 

Wow, mind reader!

 

I know, I know..

 

I'm pretty impressive like that.

 

If you were really impressive, you could tell me where he got whatever he's smoking. =)

 

Anyway:

@Thread starter: Please post something else if you want help.  Like, at all. =/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.