Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta
    • 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, 66 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.
What's the best type of cheese?

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

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