close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Two Errors: Undefined Index, and Cannot modify header // details.php to cart.php

Thread began 12/09/2014 1:36 pm by beaded | Last modified 12/10/2014 10:27 am by Jason Byrnes | 1703 views | 5 replies |

beaded

Two Errors: Undefined Index, and Cannot modify header // details.php to cart.php

Testing the newly created cart.php page, I receive two errors:
Notice: Undefined index: ProductThumb in /Applications/MAMP/htdocs/LisaCakeTest/products_detail.php on line 64

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/LisaCakeTest/products_detail.php:64) in /Applications/MAMP/htdocs/LisaCakeTest/products_detail.php on line 91

But the line 64 for ProductThumb looks fine and product thumb is included in the Recordset. Tried to divine the "spaces" common mistake, but I'm not sure what I have.

I realize I asked a very similar question months ago, but this seems different.

Sign in to reply to this post

Jason ByrnesWebAssist

the undefined index error is the cause of the headers already sent error.

send a copy of the products_detail.php page so i can look at the code to troubleshoot.

Sign in to reply to this post

beaded

Thanks. products_detail.php page attached.

Attached Files
products_detail.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

line 64, you are binding to the productThumb column of the WADAproducts recordset

$ATC_itemThumbnail = "".$row_WADAproducts['ProductThumb'] ."";// column binding.


the SQL for the WADProducts recordset is at line 47:
$query_WADAproducts = sprintf("SELECT ProductID, ProductName, ProductImage, ProductName, ProductShortDesc, ProductLongDesc, ProductPrice, ProductShortDesc, ProductLongDesc FROM products WHERE ProductID = %s", GetSQLValueString($ParamProductID_WADAproducts, "int"));

the select statement of that recordset does not include a ProductThumb column.

there is ProductImage, but not ProductThumb.

you either need to edit the recordset and add the ProductThumb column to the select statement, or edit the add to cart and use a different column binding for the thumbnail column.

Sign in to reply to this post

beaded

THANKS.

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