[FX.php List] error help
DC
dan.cynosure at dbmscan.com
Thu Aug 31 13:32:42 MDT 2006
this code also has a syntax error in the foreach call. it leads me to
believe that you are not actually calling this script but another
script entirely. if you were calling this code as it is posted you
would get a PHP syntax error at the very least.
dan
On Aug 31, 2006, at 1:38 PM, Jonathan Schwartz wrote:
> Let's step back a moment.
>
> Is the overall goal to create a new Student record using the data
> submitted in the form?
>
> If so, there is a fundamental issue you need to learn:
> 1) The form accepts the data entry. This can be straight html
> page...no php at all.
> 2) The form calls a second page (form_response) which creates the
> record.
> 3) The thank you page could be a third page or simply added to the
> form_response page.
>
> I order for this to work, separate your form from your form_response.
>
> That being said, there are more advanced techniques to cram this
> all into a single page, but I'm guessing that you might not be
> seeking that right now.
>
> Does that help?
>
> Jonathan
>
>
> At 12:01 PM -0500 8/31/06, Dale Bengston wrote:
>> You are not supplying the firstname or surname values to your FX
>> query. You are passing FX
>> a database
>> a layout
>> a username
>> a password
>>
>> ...but no field data.
>>
>> Dale
>>
>>
>> On Aug 31, 2006, at 11:55 AM, gary redmond wrote:
>>
>>> I still get a blank screen it dosen't print anything to the
>>> screen, I am
>>> trying to add a new student using the details from the html form.
>>> full
>>> code below
>>> ?
>>> include_once('FX/FX.php');
>>> include_once('FX/server_data.php');
>>> $groupSize=50;
>>> $addstu=new FX($serverIP,$webCompanionPort);
>>> $addstu->SetDBData($WebDB,$layout);
>>> $addstu->SetDBPassword($webPW,$webUN);
>>> $addstuResult=$addstu->FMNew();
>>> echo $addstuResult['errorCode'];
>>> foreach($addstuResult['data'] as $key=>$addstuData);
>>> print_r($addstuResult);
>>> ?>
>>>
>>> <html>
>>> <head>
>>> <meta http-equiv="Content-Type" content="text/html;
>>> charset=ISO-8859-1" />
>>> <title>Test Page</title>
>>> </head>
>>> <body>
>>> <form method="post" action="thankyou.php">
>>> 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" />
>>> </form>
>>> </body>
>>> </html>
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: Dale Bengston <dbengston at preservationstudio.com>
>>> Date: Thursday, August 31, 2006 5:36 pm
>>> Subject: Re: [FX.php List] error help
>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>
>>>> What do you get on screen if you print_r($addstuResult);?
>>>>
>>>> Dale
>>>>
>>>> On Aug 31, 2006, at 11:30 AM, gary redmond wrote:
>>>>
>>>>> I have errors switched on but it is not generating any, the
>>>> problem is
>>>>> not to do with ascii characters as I have tried the files that
>>>> come in
>>>>> the tutorial folder and they also produce blank pages.
>>>>>
>>>>> Anyone any ideas .... been working on this for 3 solid days and
>>>>> just
>>>>> can't make it work.
>>>>>
>>>>> ----- Original Message -----
>>>>> From: Dale Bengston <dbengston at preservationstudio.com>
>>>>> Date: Thursday, August 31, 2006 5:02 pm
>>>>> Subject: Re: [FX.php List] error help
>>>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>>>
>>>>>> The code you posted appears to create a new, blank record in the
>>>>>> table called 'Student'?
>>>>>>
>>>>>> What do you get if you print_r($addstuResult);?
>>>>>>
>>>>>> Is error display turned off, so you are not seeing errors, which
>>>>>> could help you troubleshoot?
>>>>>>
>>>>>> Dale
>>>>>>
>>>>>> On Aug 31, 2006, at 9:35 AM, gary redmond wrote:
>>>>>>
>>>>>>> I tried that still a blank page.
>>>>>>>
>>>>>>> <?
>>>>>>> include_once('FX/FX.php');
>>>>>>> include_once('FX/server_data.php');
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> $groupSize='50';
>>>>>>>
>>>>>>>
>>>>>>> $addstu=new FX($serverIP,$webCompanionPort,'FMPro7');
>>>>>>> $addstu->SetDBData('Student','stureg',$groupSize);
>>>>>>> $addstu->SetDBPassword('','admin');
>>>>>>>
>>>>>>>
>>>>>>> $addstuResult=$addstu->FMNew();
>>>>>>>
>>>>>>> echo $addstuResult['errorCode'];
>>>>>>> foreach($addstuResult['data'] as $key=>$addstuData);
>>>>>>>
>>>>>>>
>>>>>>> ?>
>>>>>>> <html>
>>>>>>> <head>
>>>>>>> </head>
>>>>>>> <body>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <br><form method='post' action='thankyou.php'>
>>>>>>>
>>>>>>> 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'>
>>>>>>> </form>
>>>>>>>
>>>>>>> </body>
>>>>>>> </html>
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: DC <dan.cynosure at dbmscan.com>
>>>>>>> Date: Thursday, August 31, 2006 2:52 pm
>>>>>>> Subject: Re: [FX.php List] error help
>>>>>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>>>>>
>>>>>>>> sometimes you'll get a blank page when there are extra (high
>>>> ascii>>>> or
>>>>>>>> low ascii) characters in your code. this usually happens
>>>>>>>> when you
>>>>>>>> copy and paste several lines of code from a web page. the code
>>>> has>>>> extra stuff in it that you have to strip out by hand.
>>>>>>>>
>>>>>>>> In case you are using it, BBEdit has a command called
>>>>>>>> "convert to
>>>>>>>> ASCII" that will strip the weirdness out automatically. other
>>>> text>>>> editing tools may have commands to help.
>>>>>>>>
>>>>>>>> dan
>>>>>>>>
>>>>>>>> On Aug 31, 2006, at 9:20 AM, gary redmond wrote:
>>>>>>>>
>>>>>>>>> No that wasn't the problem, I checked the php.ini file and
>>>>>>>> realised
>>>>>>>>> that
>>>>>>>>> short openings were off but I enabled them and now I just
>>>>>>>>> get a
>>>>>>>>> blank page.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ----- Original Message -----
>>>>>>>>> From: Jack Kelly <jlk4p at virginia.edu>
>>>>>>>>> Date: Thursday, August 31, 2006 2:04 pm
>>>>>>>>> Subject: Re: [FX.php List] error help
>>>>>>>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>>>>>>>>
>>>>>>>>>> My guess is that you've got two ?> in your code. Look at
>>>>>>>>>> the
>>>>>>>>>> statement for your SetDBData. Does it look like this?
>>>>>>>>>>
>>>>>>>>>> $addstu?>SetDBData('Student','stureg',$groupSize);
>>>>>>>>>>
>>>>>>>>>> If so change that question mark to a dash and you should be
>>>> fine.>>>>>>
>>>>>>>>>> On Aug 31, 2006, at 3:34 AM, Gary Redmond wrote:
>>>>>>>>>>
>>>>>>>>>>> I can't get php.fx to work i keep getting this message
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SetDBData('Student','stureg',$groupSize); $addstu-
>>>>> SetDBPassword>>>>>>> ('','admin'); $addstuResult=$addstu->FMNew();
>>>> echo $addstuResult
>>>>>>>>>>> ['errorCode']; foreach($addstuResult['data'] as
>>>>>>>>>> $key=>$addstuData); ?>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> 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
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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