| View previous topic :: View next topic |
| Author |
Message |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Thu Jun 04, 2009 10:50 am Post subject: Newbie questions about Air Alliance sample |
|
|
Hi I am new to php and NetBeans which I think is just awesome.
I have two beginners questions I'd like to ask
1.. I am running the sample demo Air Alliance and when I enter a booking that doesnt match any Itinerary I see in the browse the error message Notice: Undefined variable: flightsArray in C:\wamp\www\AirAlliance\itinerarymanager.php on line 256. I can see way the array is null but why does this cause the message to display in the browser when the program seems to carry on ok?
line 256 is return $flightsArray;
2.. When I do pick a valid booking it says "The following flights are available for the selected sectors. Please select a flight and continue. All a see is a radio button to select flight but no button to continue. Why is that? is the line below meant to do something?
<input class="form_submitb" type="submit" value="Process Itinerary" />
|
|
| Back to top |
|
 |
Filip Zamboj Posted via mailing list.
|
Posted: Thu Jun 04, 2009 11:05 am Post subject: Newbie questions about Air Alliance sample |
|
|
Hi!
see my comments inline.
alan.nz wrote:
| Quote: | Hi I am new to php and NetBeans which I think is just awesome.
I have two beginners questions I'd like to ask
1.. I am running the sample demo Air Alliance and when I enter a booking that doesnt match any Itinerary I see in the browse the error message Notice: Undefined variable: flightsArray in C:\wamp\www\AirAlliance\itinerarymanager.php on line 256. I can see way the array is null but why does this cause the message to display in the browser when the program seems to carry on ok?
line 256 is return $flightsArray;
| It's a warning not a failure that's why program works. You got warning
from php not from netbeans. you should see php_ini directive that you
can use if you want to hide warnings (see php.net for further reference)
and/or errors.
| Quote: | 2.. When I do pick a valid booking it says "The following flights are available for the selected sectors. Please select a flight and continue. All a see is a radio button to select flight but no button to continue. Why is that? is the line below meant to do something?
<input class="form_submitb" type="submit" value="Process Itinerary" /> :D
| Well that line is a submit button. Do you have mysql working properly if
you don't see any values? (that program is using database)
|
|
| Back to top |
|
 |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Thu Jun 04, 2009 9:35 pm Post subject: |
|
|
Thank you for your response.
I understand number one now. Cheers.
Second question works in Firefox but not IE7. I guess its a html problem which I'm sure I'll figure out soon. I see a style sheet is also envolved in the submit button so maybe the problem is in there.
|
|
| Back to top |
|
 |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Fri Jun 05, 2009 2:34 am Post subject: |
|
|
not using the style sheet for the submit button seems to work in IE7
However theres another problem in that when using IE7 when the processitinerary.php form reloads after a post the ($_REQUEST["sourcelist"] variable has changed to null which prevents it from processing any further. Works fine under Firefox. Anyone got an idea whats going on? or at least comfirm it works for them under IE7
Thanks.
P.S. Love the debugger XDebug its really helping me learn a lot.
|
|
| Back to top |
|
 |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Wed Jun 10, 2009 1:35 am Post subject: |
|
|
Ok I think I have solved it now. It took me a while as Im learning php as I go.
first off in processitinerary.php
lines 125 and on are missing the end ">" symbol
//Forward the itinerary data
echo "<input type='hidden' name='fname' value='".$fname."'";
echo "<input type='hidden' name='lname' value='".$lname."'";
should be
echo "<input type='hidden' name='fname' value='".$fname."'>";
echo "<input type='hidden' name='lname' value='".$lname."'>";
etc etc
IE7 is less forgiving on syntax
Second (but less important) the first lines go
if(!isset($_SESSION['sectors'])){
session_start();
these two lines should be swapped to
session_start();
if(!isset($_SESSION['sectors'])){
session_start(); needs to execute first so the $_SESSION['sectors'] gets populated before testing. currently its always loading the values from the database needlessly.
I have not looked at why the sytle sheet submit button doesnt work in IE7 yet just using my own submit button for now. Maybe its syntax again.
|
|
| Back to top |
|
 |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Wed Jun 10, 2009 10:53 am Post subject: |
|
|
| Turns out the missing submit button was only because it followed the missing ">" syntax. So all is good now.
|
|
| Back to top |
|
 |
Tomas Mysik Posted via mailing list.
|
Posted: Wed Jun 10, 2009 11:59 am Post subject: Newbie questions about Air Alliance sample |
|
|
Hi,
Dne středa 10 června 2009 12:53:07 alan.nz napsal(a):
| Quote: | Turns out the missing submit button was only because it followed the
missing ">" syntax. So all is good now.
|
it would be great if you could provide a patch, I would apply it.
Thanks,
Tomas
--
Tomas Mysik
address-removed
|
|
| Back to top |
|
 |
alan.nz
Joined: 04 Jun 2009 Posts: 6
|
Posted: Wed Jun 10, 2009 9:03 pm Post subject: |
|
|
Heres my patch. I am running NetBeans version 6.5.1
I have already emailed the author (Frank J) so it may already be fixed. Cheers.
| Description: |
| Patch for AirAlliance sample |
|
 Download |
| Filename: |
processitinerary.zip |
| Filesize: |
2.3 KB |
| Downloaded: |
43 Time(s) |
|
|
| Back to top |
|
 |
Tomas Mysik Posted via mailing list.
|
Posted: Thu Jun 11, 2009 1:04 pm Post subject: Newbie questions about Air Alliance sample |
|
|
Hi,
Dne středa 10 června 2009 23:03:01 alan.nz napsal(a):
| Quote: | Heres my patch. I am running NetBeans version 6.5.1
I have already emailed the author (Frank J) so it may already be fixed.
Cheers.
|
I will look at it and fix it.
Thanks,
Tomas
--
Tomas Mysik
address-removed
|
|
| Back to top |
|
 |
|