[FX.php List] error help
DC
dan.cynosure at dbmscan.com
Fri Sep 1 08:57:01 MDT 2006
Just a general counsel... you should look at writing code as building
a brick wall - you have to put down the bottom bricks first, then,
only when you are certain that those are placed properly do you put
the next layer on. with a brick wall it is almost impossible to put
the second layer on before the first, but with code, you can put lots
of layers on right away and really stuff yourself up.
start simple. build incrementally. test. (oh, did i mention test?)
dan
On Sep 1, 2006, at 10:39 AM, Jonathan Schwartz wrote:
> Another possible problem... you used a different field name for
> Last Name on your form:
>
> stunum<input type='text' name='stunum' value=''><br>
> firstname<input type='text' name='firstname' value=''><br>
> surname<input type='text' name='surname' value=''><br>
>
> <input type='submit' name='submit' value='Submit'>
>
>
> Using the tools I provided, starting with Debug, would show you
> that these fields were not properly displayed in the query.
>
> J
>
>
>
>
> At 9:21 AM -0500 9/1/06, Dale Bengston wrote:
>> One thing I noticed... you are setting variables called $first and
>> $last from $_POST, but referring to them in your FX query as
>> $firstname and $lastname.
>>
>> Dale
>>
>> On Sep 1, 2006, at 5:02 AM, gary redmond wrote:
>>> Ok I have created a form on a age called test.php
>>>
>>>
>>>
>>> and then have it set to post to the file addstudent.php (code
>>> below) but
>>> it's still not adding the student to the db.
>>>
>>>
>>> <?
>>> include_once('FX/FX.php');
>>> include_once('FX/server_data.php');
>>>
>>> $stunum=$_POST['stunum'];
>>> $first=$_POST['first'];
>>> $last=$_POST['last'];
>>>
>>>
>>>
>>> $groupSize='50';
>>>
>>>
>>> $register=new FX($serverIP,$webCompanionPort,'');
>>> $register->SetDBData('Student.fp7','stureg',$groupSize);
>>> $register->SetDBPassword('','Admin');
>>> $register->AddDBParam('stunum',$stunum);
>>> $register->AddDBParam('last',$lastname);
>>> $register->AddDBParam('first',$firstname);
>>>
>>>
>>> $registerResult=$register->FMNew();
>>>
>>> echo $registerResult['errorCode'];
>>> foreach($registerResult['data'] as $key=>$registerData);
>>>
>>>
>>> ?>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: Kevin Futter <kfutter at sbc.melb.catholic.edu.au>
>>> Date: Friday, September 1, 2006 0:24 am
>>> Subject: Re: [FX.php List] error help
>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>> On 1/9/06 12:50 AM, "DC" <dan.cynosure at dbmscan.com> wrote:
>>>>> looks like there is still a bunch of blank space... did you use
>>>>> the
>>>>> bbedit trick or do it by hand and replace with real return
>>>> characters?>
>>>>> you have to tediously remove every single itty bitty space
>>>>> character
>>>>> including the ones in between code pieces like equals signs and
>>>>> all
>>>>> the spaces after semicolons and in the html if you copy pasted
>>>>> that.
>>>>> it's really tedious. so if you don't have an automated way of
>>>>> doing
>>>>> it you've got to be really precise and thorough.
>>>>>
>>>>> also, the same goes for the included files.
>>>>>
>>>>> this probably isn't part of your issue, but, i noticed that you
>>>>> are
>>>>> using single quotes in HTML attributes. i'm pretty sure that
>>>>> double
>>>>> quotes are required by one standard or other. i recall reading
>>>>> that
>>>>> with regards to XHTML or something. sorry i can't be more
>>>> specific -
>>>>> maybe someone else on the list has more detail on why double
>>>>> quotes
>>>>> are better for HTML attributes.
>>>>
>>>> Yes, double quotation marks are indeed required by all versions of
>>>> the XHTML
>>>> spec. They are of course optional for single character attribute
>>>> values in
>>>> all versions of the HTML spec, but good practice nonetheless.
>>>> Multiple
>>>> character attribute values still require quoting with double-quotes
>>>> in HTML
>>>> though.
>>>>
>>>> --
>>>> Kevin Futter
>>>> Webmaster, St. Bernard's College
>>>> http://www.sbc.melb.catholic.edu.au/
>>>>
>>>>
>>>>
>>>> ------------------------------------------
>>>> This e-mail and any attachments may be confidential. You must not
>>>> disclose or use the information in this e-mail if you are not the
>>>> intended recipient. If you have received this e-mail in error,
>>>> please notify us immediately and delete the e-mail and all copies.
>>>> The College does not guarantee that this e-mail is virus or error
>>>> free. The attached files are provided and may only be used on the
>>>> basis that the user assumes all responsibility for any loss, damage
>>>> or consequence resulting directly or indirectly from the use of the
>>>> attached files, whether caused by the negligence of the sender or
>>>> not. The content and opinions in this e-mail are not necessarily
>>>> those of the College.
>>>>
>>>>
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> FX.php_List at mail.iviking.org
>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> --
>
> Jonathan Schwartz
> FileMaker 8 Certified Developer
> Associate Member, FileMaker Solutions Alliance
> Schwartz & Company
> jonathan at eschwartz.com
> http://www.eschwartz.com
> http://www.exit445.com
> 415-381-1852
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list