PHP File Crashes Dreamweaver CS3

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 13, 2009   (RSS)

By gkornbluth - February 13, 2009 - edited: February 13, 2009

We'll, I'm stuck again...

I’m using a PayPal Website Standard shopping cart form on my client’s site and need to pull price data from my CMS database.

The form works on line as expected in both IE7 and FF3 at http://www.thecraftgallery.net/mayco11.php

I’m also testing to make sure that a size and price are selected before submission, but that does not seem to be part of the problem.

I can open the PHP file in Dreamweaver CS3, but when I try to edit the PHP file the program crashes as soon as I click anywhere in the file.

The code in the form that’s seems to be in question is:

<input type="hidden" name="xxx">
<select name="amount" style="width:150px;font:9px;margin-top:4px">
<option selected>Select a Size</option>
<?php if ($record['8_oz_price']): ?><option value="<?php echo $record['8_oz_price'] ?>">8 Ounce Size - <?php echo $record['8_oz_price'] ?></option><?php endif ?>
<?php if ($record['16_oz_price']): ?><option value="<?php echo $record['16_oz_price'] ?>">16 Ounce Size - <?php echo $record['16_oz_price'] ?></option><?php endif ?>
<?php if ($record['64_oz_price']): ?><option value="<?php echo $record['64_oz_price'] ?>">64 Ounce Size - <?php echo $record['64_oz_price'] ?></option><?php endif ?>
</select>

I validated the xml and I get a error message that says, “<“ can not be used in attribute “value”, except through &lt; (xml).

I’ve tried to replace the offending “<“ with “&lt;” but then the php doesn’t seem to work.

If I take the PHP code out entirely and substitute specific coded values all is well.

There must be something that I’m missing.

Any ideas guys?

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] PHP File Crashes Dreamweaver CS3

By Donna - February 13, 2009

Hi Jerry,

I'd be willing to bet it's a Dreamweaver bug -- a little googling didn't help me find the exact problem, but similar things are reported back by other people.

What error message do you get when Dreamweaver crashes?

I wouldn't worry about that particular validation error -- validation doesn't generally take php code into account, since it's parsed out before the browser sees it. If you were getting validation errors like that on the published page, that'd be something to look at.
Donna

--
support@interactivetools.com

Re: [gkornbluth] PHP File Crashes Dreamweaver CS3

By Donna - February 13, 2009

Hi Jerry -- take a look at this thread, it seems to report the same thing you're experiencing:

http://groups.google.com/group/macromedia.dreamweaver/browse_thread/thread/e493f48243a14b28/2fa3ea8a3c34ba5b

This thread includes a possible fix, too. :)
Donna

--
support@interactivetools.com