close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Data Assist Multiple Insert Data Assist Repeat Selection: Do/Else Error

Thread began 11/18/2014 6:35 pm by KTay36841385 | Last modified 11/20/2014 11:32 am by Jason Byrnes | 1115 views | 5 replies |

KTay36841385

Data Assist Multiple Insert Data Assist Repeat Selection: Do/Else Error

Created insert form and applied Data Assist Repeat Selection (5 rows). Testing formatting on the server, and everything looked great (five rows, selections good, date field fine). Added Data Assist Multiple Insert and got a Do/Else error (“Parse error: syntax error, unexpected T_ELSE, expecting T_WHILE in /home/thirdco/public_html/Transaction/rank_mb_add.php on line 217”).
See code attached. I walked the code, but error was immediately apparent—used only standard behaviors, so I did not expect an error.
Any help?

Attached Files
ym_add.php
Sign in to reply to this post

Jason ByrnesWebAssist

the file referenced in the error was named "rank_mb_add.php "

but the file you sent is a different one, named "ym_add.php"

i need to see the file referenced in the error in order to troubleshoot the code that is causing the error.

Sign in to reply to this post

KTay36841385

Jason: Really sorry for wasting your time by attaching the wrong file--my error. Saved file as "_2" since I reverted to single insert to be able to make it functional. This is the version that failed (see error message below for referenced file).

Parse error: syntax error, unexpected T_ELSE, expecting T_WHILE in /home/thirdco/public_html/Transaction/rank_mb_add_2.php on line 217


Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

line 203 - 212, you have a hidden element inside the elect list, which has caused part of the dynamic select repeat to be missing.

edit:

<td align="center"><select name="RankSelect_<?php echo $RepeatSelectionCounter_1; ?>" id="RankSelect_<?php echo $RepeatSelectionCounter_1; ?>" form="form1" title="RankSelect">
<option value="">--Select--</option>
<?php
do {
?>
<option value="<?php echo $row_rsRank['Rank_ID']?>"><?php echo $row_rsRank['Rank_Desc']?></option>
<input type="hidden" name="YMSelect_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="YMSelect_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />
undefined

</select></td>




to:

<td align="center"><select name="RankSelect_<?php echo $RepeatSelectionCounter_1; ?>" id="RankSelect_<?php echo $RepeatSelectionCounter_1; ?>" form="form1" title="RankSelect">
<option value="">--Select--</option>
<?php
do {
?>
<option value="<?php echo $row_rsRank['Rank_ID']?>"><?php echo $row_rsRank['Rank_Desc']?></option>
<?php
} while ($row_rsRank = mysql_fetch_assoc($rsRank));
$rows = mysql_num_rows($rsRank);
if($rows > 0) {
mysql_data_seek($rsRank, 0);
$row_rsRank = mysql_fetch_assoc($rsRank);
}
?>
</select><input type="hidden" name="YMSelect_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="YMSelect_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" /></td>
Sign in to reply to this post

KTay36841385

Jason: Thanks very much! I never would have found it! I will apply as soon as I get back to my development machine.

Thanks again for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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