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 )

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.