I am just starting to teach myself PHP and i have created a script from a book but i get these error messages.
Notice: Use of undefined constant id - assumed 'id' in C:\wamp\www\pet sathome\seestor e.php on line 21
Notice: Use of undefined constant cat_title - assumed 'cat_title' in C:\wamp\www\pet sathome\seestor e.php on line 22
Notice: Use of undefined constant cat_desc - assumed 'cat_desc' in C:\wamp\www\pet sathome\seestor e.php on line 23
Notice: Use of undefined constant cat_id - assumed 'cat_id' in C:\wamp\www\pet sathome\seestor e.php on line 28
Notice: Undefined index: cat_id in C:\wamp\www\pet sathome\seestor e.php on line 28
Under these messages it shows the items of the page correct so i am confused. any help would be appreciated.
Regards
8 3661 zorgi 431
Recognized Expert Contributor
It looks like you have loads of undefined constants. You can:
a) make sure those constants are defined
b) condition your usage of those constants
c) disable notices in php.ini by setting error_reporting = E_ALL to error_reporting = E_ALL & ~E_NOTICE
Thanks i will try those.
Is there a really basic shopping cart out there for beginners to learn from?
regards
zorgi 431
Recognized Expert Contributor
I did installation of PrestaShop and it was very simple strait forward job.
Also did VirtueMart adaptations but would not recommend unless you are very good with joomla.
Also might be worth checking http://www.zen-cart.com/. Never worked with it but looks popular.
Markus 6,050
Recognized Expert Expert
You're not using a string where you should be using one. Consider the following: -
$data = array (
-
'name' => 'Sarah',
-
'age' => 22
-
);
-
-
// Wrong
-
echo $data[name];
-
// Correct
-
echo $data['name'];
-
hi my friend
for write a script and debuging it is better that error_reporting setting in php.ini to be set to E_ALL that show all error , warning , notice and the other but for representing site on the web this is set to what doesnt show notice and warning that can be danerous for site for correct your script you must check this constant is defined or not
note: writing name of the variable without or forgetting wirte $ create the same error
note2: constant is defined withe define(name, value)
and name is not consist of $ and is better write with uppercase letter
be successful
Dormilich 8,658
Recognized Expert Moderator Expert
note2: constant is defined withe define(name, value)
or
(though that requires you to follow the constant definition constraints)
I Think You Might Have Not Defined Your CONSTANT Correctly.
First Try Editing Your CONSTANT By ReDefining It In The Error Lines .
For syntax:
define('CONSTAN TNAME','CONSTAN TVALUE');
For Example :
define('CONSTAN TID','3214');
Once You've Rectified Your Constants,Make Some Few Changes In Your php.ini File....
1.expose_php=of f
2.display_error s=off
3.log_errors=on
The Errors Now Will Be Posted In Your Error Log File Rather Than Viewing It In Your Applications
4.error_log=fil ename
Hope This Works....
If You Find AnyMore Problem...Let Me Know..
<email removed>
Thanks for all your help.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: doug |
last post by:
I am working on a C++ program in .NET. The compiler
generates error messages that are associated with the
wrong line numbers (which is extremely frustrating).
Also, the debugger arrow is positioned on the wrong line
after breakpoints and steps.
Can anyone explain this to me?
The following is added information that may be related to
the symptoms I am seeing:
|
by: Steve |
last post by:
Hi;
I went to the microsoft site to try to find a guide to the error
messages that the jdbc drivers give ( for sqlserver 2000 ).
I had no luck.
Does anyone know if there is such a guide?
I got this mysterious error message below in my logs ( nothing visible
|
by: ranma79 |
last post by:
Hi,
Has anyone played around with Schema Extensions to provide custom
error messages when validating an XML file with an XSD? This is
mentioned in Appendix B of O'Reilly's XML Schema book (page 359) as
work in progress. However, I'm not able to find any additional
information about it on the web. The premise is that you can provide
custom error messages in place of the often-obscure error messages
returned by schema processors. If...
|
by: Schoo |
last post by:
I don't know how this happened, but my development workstation suddenly
stopped showing error messages in IE and instead shows a web portal of some
kind that has "Problems finding what you're looking for?" accross the top
and a bunch of links to search.windowenhancer.com. I must have downloaded
something and inadvertantly got this on my machine. Anyone know how I can
get this off so I can read my development error messages again?
Scott
|
by: Jon Maz |
last post by:
Hi All,
To allow myself to make development changes directly on a remote server
*without* having to compile on my local dev machine and then upload the
dll's to remote, I have created a RunBatch.aspx on the remote which calls a
batch file (myBuild.bat) on the same machine, and this batch file executes
the necessary command-line compiler instructions to recompile (code below).
So far (fingers crossed) it seems to be working. The only...
| |
by: Jennifer |
last post by:
On a NT 4 server, there is a VB.Dot Net application. We've been noticing
that the server has been running slow lately. Looking at the event log, we
found some error messages. Can/Will someone please explain these?
Thanks,
Jennifer
1/3/05,9:13:07 AM,Perflib,Error,None,1011,N/A,WB0313,The library file ""
specified for the ".NETFramework" service could not be opened. Performance
|
by: Piotr Sawuk |
last post by:
I'm a newbie in the world of c++, and I am used to learn a programming
language simply by programming. Unfortunately I where unable to find
any useful helpfile for this language, in which such basic things as
"class", "operator ::", or even my compiler's error-messages would
get explained in a quick-reference kind of way (as turbo pascal did
with the pascal-language). Therefore I was forced to read some books
and tutorials. However, I'm...
|
by: bjbounce2002 |
last post by:
Hello,
I am using forms with command buttons to close form or run action
queries. The error messages such as "Null value in required field" or
"duplicate value in primary key" are suppressed. The error messages
appear when runnign the apend query manually or when closing the form
using X, but not when using command buttons.
Does anyone know how can the messages be displayed when using command
|
by: Skybuck Flying |
last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C
compilers produce so many error messages as soon as a closing bracket is
missing. The response was simply because the compiler can't tell where a
bracket is missing.... a few weeks have past, I requested a feature for the
delphi ide/editor "automatic identation of code in begin/end statements etc"
and today when I woke up I suddenly released a very simple solution for this...
|
by: Greg Buchholz |
last post by:
I'm wondering if anyone has advice for figuring out error messages
produced by g++. The programs below works fine, until I uncomment out
the two "transform" lines. Then it points me to line 24 (where the
second "bind1st" is) and results in an error message complaining about
no match for 'operator=' and/or problems with 'back_insert_iterator'
(see the entire error message reproduced below). Do I need a cast
somewhere to keep the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |