Hey! Sign in to get help with your study questionsNew here? Join for free to post

Help with my php

Announcements Posted on
Four hours left to win £100 of Amazon vouchers!! Don't miss out! Take our short survey to enter 24-10-2016
    • Thread Starter

    I'm trying to create a search for my website that sells products and it has to be in next week. when searching for an item it says i have a problem at line 8 . I've been trying all day to figure it out and aren't really getting anywhere. this is my code thanks in advance . oh and the include init at the top is just my connection to the database
    Attached Files
  1. File Type: docx php.docx (107.4 KB, 23 views)

    Well ideally you should never post your code in a word document when you're trying to get people from the internet to read/help you with your code.
    Use something like, http://pastebin.com/ next time. Here I made you one.

    Anyway after looking at your code, it seems like your error is a scoping error. Inside your
    isset if statement, you're only declaring the $productName variable there. You should declare it outside your if statement.
Write a reply…


Submit reply


Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  3. this can't be left blank

    6 characters or longer with both numbers and letters is safer

  4. this can't be left empty
    your full birthday is required
  1. Oops, you need to agree to our Ts&Cs to register
  2. Slide to join now Processing…

Updated: May 5, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

What do you wear to bed?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.