close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Warnings

Thread began 11/19/2021 10:47 am by randyrie405335 | Last modified 12/09/2021 5:11 pm by Ray Borduin | 311 views | 5 replies |

randyrie405335

Warnings

I'm trying to use a Windows 10 VM (via Parallels) on my Mac and one of my websites gives these warnings when I open my newsletter php page:

Warning: Undefined array key "IssueMonth" in C:\xampp\htdocs\Leathernecks\includes\incl_newsletter_current.php on line 6
Warning: Undefined variable $GET in C:\xampp\htdocs\Leathernecks\includes\incl_newsletter_current.php on line 7
Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\Leathernecks\includes\incl_newsletter_current.php on line 7

The newsletter page works fine on my Mac's localhost and on my public server. How do I fix this on my VM?

Sign in to reply to this post

Ray BorduinWebAssist

You can turn off warnings and then you won't see the messages and it won't effect your functionality, or you can fix the lines listed in the warnings.

Sign in to reply to this post
Did this help? Tips are appreciated...

randyrie405335

I'd like to have the notice fixed rather than ignored. So what does "undefind array key "IssueMonth" mean? I've checked the MySQL dB, the recordset in DW, the binding, and everything works fine. But I still get this notice... see the screen capture.

Sign in to reply to this post

Ray BorduinWebAssist

I'd have to look at the page and line number in the error to tell you what is wrong.

Sign in to reply to this post
Did this help? Tips are appreciated...

randyrie405335

Notice: Undefined index...

I'm still getting these notices even after re-installing Dreamweaver CS6, DataBridge 2.35, re-installing the table's SQL, turning off all error-reporting in my php.ini file, and rebuilding both pages in Dreamweaver. See the screen capture and attached webpages.

Sign in to reply to this post

Ray BorduinWebAssist

You must have notices turned on in your local php.ini and not on your live.

The error is because you are referring to url parameters that don't exist when the page first loads. For example on the archive.php page you have:
$rsNewsletter->bindParam("s", "".$_GET['IssueMonth'] ."", "-1xx"); //varIssueMonth
$rsNewsletter->bindParam("s", "".$_GET['IssueYear'] ."", "-1xx"); //varIssueYear

In order to account for situations where the URL parameter doesn't exist, you should use:

$rsNewsletter->bindParam("s", "".(isset($_GET['IssueMonth'])?$_GET['IssueMonth']:"") ."", "-1xx"); //varIssueMonth
$rsNewsletter->bindParam("s", "".(isset($_GET['IssueYear'])?$_GET['IssueYear']:"") ."", "-1xx"); //varIssueYear

Turning off Notices in your php.ini would accomplish the same result since the value would be ignored.

Sign in to reply to this post
Did this help? Tips are appreciated...

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