CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Bangalore, INDIA

    Very basic question. Help needed. Most urgent.

    Hi Guys

    I am pretty pretty new here. I have been suddenly assigned the job of maitaining a "functional" project originally developed in PHP/MySQL. So, I am required to first learn the language and then look for what needs to be done there.
    Anyway, I am not very new to PHP style of programming, as I have knowledge of C, C++ and now C# too.
    Well, when I installed PHP 4.3.9 on to my computer and successfully got phpinfo() show me the results, I then copied the project to the required location, and when tried viewing it in the browser, I get an error as follows -
    Notice: Undefined index: adv_pub_user_id in C:\wwwroot\inetpub\s3\lib\css_generator.php on line 6

    The line 6 of the original code is as follows -
    if (!$_SESSION['adv_pub_user_id']) { $_SESSION['adv_pub_user_id'] = trim($_REQUEST['pub_id']); }

    From what I understand is, unlike in ASP / ASP.NET, upon encountering a Session / Request which is unavailable/not-set-yet, no error is displayed, but in PHP it seems to be happening so. And, I guess something somewhere needs to be set to prevent this from happening.

    Guys, this a very urgent and important assignment. Your help would be highly appreciated.



  2. #2
    Join Date
    Sep 2004

    Re: Very basic question. Help needed. Most urgent.

    You are better off checking if the variabloe is set first using something like:

    if (isset($_SESSION['adv_pub_user_id'])).....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.