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))
{

Did you know?Explore Trending and Topic pages for more stories like this.
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

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

Changing color in GD via variable?
Hey guys, I'm new here. x)

I'm very much a noob when it comes to PHP, but I'm trying to learn

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

PHP switch function help
Hi, I am trying to create a search function for a directory website. On the search function on html

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

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