Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2008, 10:02 AM
Registered User
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Notice: Undefined variable error on input form

Hi Guys,

I'm setting up a form component in Joomla on a local XP server and I'm getting this error message:

Notice: Undefined variable: bInputFields in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\joompla\components\com _marketplace\write_ad.php on line 718


for every input varible.

The actual line reads like:

<?php
                if ($isUpdateMode || $bInputFields == 1) {
                    echo "<input class='marketplace' id='surname' type='text' name='surname' value='$ad_surname'>";
                }
                else {
                    echo "<input class='marketplace' id='surname' type='text' name='surname'>";
                }
                ?>
                <label class="marketplace_right" for="surname"><?php echo JOO_FORM_SURNAME_TEXT; ?></label>
             <?php


Is there a way to correct this, I will appreciate all input.

Thanks



 
Old May 9th, 2008, 06:21 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Turn down error reporting in php.ini.

Look at the documentation for the error_reporting directive:
http://us3.php.net/manual/en/ini.php#ini.list

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design, 2nd Edition
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old May 11th, 2008, 06:58 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Are you sure Richard? I'd be tempted to make sure that there weren't any errors being reported before doing that.

Have you set $bInputFields somewhere tobyb?

You should have a line somewhere that says $bInputFields = x. Where x could be a number or string.

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Notice: Undefined index: username in latinquarter PHP Databases 1 April 18th, 2008 11:37 AM
Notice: Undefined variable: comments/ Form reset dungey Pro PHP 10 December 1st, 2006 04:00 AM
Notice: Undefined offset: ## Herjan BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 November 27th, 2005 12:29 PM
Loops and Arrays - Undefined offset notice dkintheuk Beginning PHP 6 September 12th, 2005 11:38 PM
Undefined Variable: Error jjmancini Beginning PHP 2 July 27th, 2004 01:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.