Entering Data Problem


Posted on 16th Feb 2014 07:03 pm by admin

Code: $result = mysql_query("SELECT * FROM flights");
while ($row = mysql_fetch_array($result))
{

if ($flight_num == $row['flight_num']){
echo "<center>Flight Number Used!</center>";
}else{

$sql=mysql_query("INSERT INTO flights (`flight_num`, `dep_icao`, `dep_time`, `dep_name`, `arr_icao`, `arr_time`, `arr_name`, `route`, `aircraft`, `days`, `duration`, `status`)
VALUES ('$flight_num','$dep','$dep_time','$dep_name','$arr','$arr_time','$arr_name','$route','$aircraft','$days','$duration','$status')");
header ('Location: ?page=flt_ctr');

}}

No comments posted yet

Your Answer:

Login to answer
196 Like 47 Dislike
Previous forums Next forums
Other forums

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

Values disappear from my array :( HELP!
hey all, I have a lil mysql/php/apache script that queries a database
and pulls put 5 integers.

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

Get content from table into a list, without repeating.
Alright this is kinda an odd thing, so I need some help.

I have a table "quote" wit

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash