close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple insert not including post data

Thread begun 10/31/2012 8:36 am by jamie424562 | Last modified 10/31/2012 9:13 am by Jason Byrnes | 2016 views | 4 replies |

jamie424562

multiple insert not including post data

Hi folks

I have a bit of a tricky form I have been working with and am having some problems with the multiple insert page.
basicly I have 4 pages each with respective forms.
each form passes a var via post to the next form, which works fine untill it reaches the 3rd page which uses a multiple insert.
The insert works fine but the extra vars I have which need to be passed via post to the 4th and final page are no longer available after insert and redirect.

I hope that makes sense..... will try and explain a little further :)

page/form 1 provides an insert which passes to page/form 2.

page/form 2 provides 2 fields which are selected with a slider, these are passed to page/form 3 via POST.

page/form 3 displays the vars as expected, essentially displaying the total inserts requested on page/form 2
Insert of the multiple fields works a treat! but the vars are no longer posted.

The 4th and final page/form is not displaying the total selected insert fields or the db data, which is both taken from var posted from page/form 2-3.

If I change page 4 to page 3 it works, so the vars are getting lost on insert of the multiple fields......


Any help would be great, am really in need of a solution for this as I have another 100 such forms to create.

I have a attached the 4 forms for viewing.

Any helps is greatly appreciated.

Attached Files
change_company_name.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the app2.php page, where you display the data, you need to add hidden form elements in order to pass it to the next page:
for example:

php:
<td class="DetailsSublabel">Date Added:</td>
                      <td class="DetailsPage"><?php echo(($row_WADAcp_contents['cp_Date'])?date('n/d/Y',strtotime($row_WADAcp_contents['cp_Date'])):''); ?><input type="hidden" name="cp_Date" id="cp_Date" value="<?php echo(($row_WADAcp_contents['cp_Date'])?date('n/d/Y',strtotime($row_WADAcp_contents['cp_Date'])):''); ?>" /></td>
Sign in to reply to this post

jamie424562

app2.php
has this one:
<input name="cpID" type="hidden" value="<?php echo $_POST['cpID']; ?>">

which pass the id to app3.php which works fine!

app3.php has these which displays everything fine.

<input name="total_dir" type="hidden" value="<?php echo $_POST['total_dir']; ?>">
<input name="total_sh" type="hidden" value="<?php echo $_POST['total_sh']; ?>">

<input name="cpID" type="hidden" value="<?php echo $_POST['cpID']; ?>">

the two new hidden fields are only entered on app2.php and passed to app3.php and work on app3.php.

but from app3.php - app4.php these are no longer displayed and are present in the form.

Sign in to reply to this post

Jason ByrnesWebAssist

the form those elements are in on the app3.php page:
<form method="post" class="DetailsPage Cool_Default" id="Details_Cool_Default">
<ul class="Cool_Default">
<li>
<fieldset class="Cool_Default" id="Details">
<legend class="groupHeader"></legend>

<input name="total_dir" type="hidden" value="<?php echo $_POST['total_dir']; ?>">
<input name="total_sh" type="hidden" value="<?php echo $_POST['total_sh']; ?>">

<input name="cpID" type="hidden" value="<?php echo $_POST['cpID']; ?>">

<ul class="formList">
<li class="formItem">
<div>
<div id="WADADetails">
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0" width="100%">

<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_None){
?>
<tr>
<td class="DetailsSublabel">Director:</td>
<td class="DetailsPage">
<input type="hidden" name="director_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="director_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />
<input id="director_<?php echo $RepeatSelectionCounter_1; ?>" name="director_<?php echo $RepeatSelectionCounter_1; ?>" type="text" value="" class="formTextfield_Large" tabindex="">
</td>
</tr>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_None && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_None = mysql_fetch_assoc($None);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>

<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>
<span class="buttonFieldGroup" >
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" style="text-align:center;">
<input type="submit" value="Save Directors" class="formButton Grey" id="SaveDR" name="SaveDR" />
</td>
</tr>
</table>
</div>
</span>
</div>
</div>
</li>
</ul>
</fieldset>
</li>
</ul>
</form>


does not post to the app4.php page. it posts to itself because there is no action set.


Post data is only available to the action page.

Sign in to reply to this post

Jason ByrnesWebAssist

the form those elements are in on the app3.php page:
<form method="post" class="DetailsPage Cool_Default" id="Details_Cool_Default">
<ul class="Cool_Default">
<li>
<fieldset class="Cool_Default" id="Details">
<legend class="groupHeader"></legend>

<input name="total_dir" type="hidden" value="<?php echo $_POST['total_dir']; ?>">
<input name="total_sh" type="hidden" value="<?php echo $_POST['total_sh']; ?>">

<input name="cpID" type="hidden" value="<?php echo $_POST['cpID']; ?>">

<ul class="formList">
<li class="formItem">
<div>
<div id="WADADetails">
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0" width="100%">

<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_None){
?>
<tr>
<td class="DetailsSublabel">Director:</td>
<td class="DetailsPage">
<input type="hidden" name="director_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="director_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />
<input id="director_<?php echo $RepeatSelectionCounter_1; ?>" name="director_<?php echo $RepeatSelectionCounter_1; ?>" type="text" value="" class="formTextfield_Large" tabindex="">
</td>
</tr>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_None && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_None = mysql_fetch_assoc($None);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>

<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>
<span class="buttonFieldGroup" >
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" style="text-align:center;">
<input type="submit" value="Save Directors" class="formButton Grey" id="SaveDR" name="SaveDR" />
</td>
</tr>
</table>
</div>
</span>
</div>
</div>
</li>
</ul>
</fieldset>
</li>
</ul>
</form>


does not post to the app4.php page. it posts to itself because there is no action set.


Post data is only available to the action page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...