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

Using insert variable
need a way to inert variable data to mysql database

$acc = "212121212";
$nok =

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

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