-
Posts
376 -
Joined
-
Last visited
Posts posted by monkeypaw201
-
-
That outputs
Array ( [0] => Station name not available [1] => May 03, 2008 - 09:50 PM EDT / 2008.05.04 0150 UTC [2] => Wind: from the ESE (120 degrees) at 2 MPH (2 KT):0 [3] => Temperature: 14 F (-10 C) [4] => Dew Point: 12 F (-11 C) [5] => Relative Humidity: 92% [6] => Pressure (altimeter): 30.21 in. Hg (1023 hPa) [7] => ob: BGQQ 040150Z AUTO 12002KT 9999NDV ///004/// M10/M11 Q1023 RMK /// [8] => cycle: 2 ) -
all of them, and both directories are getting the errors
-
in your query should beSHA('$p')SHA1('$p')
-
i get the following error
when i run the following scriptFTP server reports 550 Could not get file size<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_bluesky = "localhost"; $database_bluesky = "my_db"; $username_bluesky = "user"; $password_bluesky = "pass"; $bluesky = mysql_pconnect($hostname_bluesky, $username_bluesky, $password_bluesky) or trigger_error(mysql_error(),E_USER_ERROR); $n = 0; mysql_select_db($database_bluesky,$bluesky); $result = mysql_query("SELECT * FROM weather ORDER BY id ASC LIMIT 100"); while($row = mysql_fetch_assoc($result)) { /* THis is for the short metars*/ $file = file("ftp://tgftp.nws.noaa.gov/data/observations/metar/stations/".$row['icao'].".TXT"); if($file) mysql_query("UPDATE airports SET raw = '".$file[1]."' WHERE icao = '".$row['icao']."'", $bluesky); else mysql_query("UPDATE airports SET raw = '[Not Available]' WHERE icao = '".$row['icao']."'", $bluesky); /* THis is for the long metars*/ $file = file("ftp://tgftp.nws.noaa.gov/data/observations/metar/decoded/".$row['icao'].".TXT"); if($file) { $decrypt = NULL; foreach ($file as $v) { $decrypt .= $v."**"; } mysql_query("UPDATE airports SET decoded = '".$decrypt."' WHERE icao = '".$row['icao']."'", $bluesky); } else { mysql_query("UPDATE airports SET decoded = '[Not Available]' WHERE icao = '".$row['icao']."'", $bluesky); } } ?>
-
I am sorry but what is SSH?
basically accessing your server with a command line
-
turns out it doesn't like it when you name the input field the same as the variable row..
-
you could just upload it and use SSH to untar with:
tar -zxf file.tat.bz2 -
nope, only 1 row..
-
i have this:
<?php $con = mysql_connect("localhost","root","rootpwd"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("pool_web", $con); $result1 = mysql_query("SELECT * FROM program WHERE day = 'sunday'"); $row_sunday = mysql_fetch_array($result1) ?>
some html... and then:
<input name="filter_start" type="text" id="filter_start" value="<?php echo $row_sunday['filter_start'] ?>" size="7" maxlength="5">
which outputs:
00:00and the database field is empty... and if i enter in the database 01:00 it still doesn't change..
oh right... the last bit of PHP on that page
<?php mysql_close($con); ?>
-
bump
-
sure, what its supposed to do;
ID - the ID column is supposed to increment by one for every row
CALLSIGN - Take the callsign set, add it to the callsign start number and iincrement by one for every row
CREATOR - Stays the same on every row
FROM - should display 'from' one the even rows and the 'to' on the odd rows
FROM (ICAO) - should display from_icao one the even rows and the to_icao on the odd rows
TO - should display 'to' one the even rows and the 'from' on the odd rows
TO (ICAO) - should display from_icao one the even rows and the to_icao on the odd rows
ETE - displays the ete (HH:MM) from the URL
ROUTE - displays to_route on even rows and from_route on odd rows
DEPARTURE TIME - the first row is just taken from the URL the other rows take the ARRIVAL TIME of the row before and add it to 'turnaround'
ARRIVAL TIME - the first row is just taken from the URL the other rows take the DEPARTURE TIME of the row before and add it to ete
AIRCRAFT - take from the URL
ACTIVE - static text
hope that clarifies..
-
i found a minor link mistake, but irrelevant to the PHP
adjusted link:
-
I go to the following URL:
and as you can see, it doesn't really work :-\
the code is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <?php $first_flight = $_GET['first_flight']; $start_id = $_GET['start_id']; $callsign_set = $_GET['callsign_set']; $callsign_start = $_GET['callsign_start']; $ete = $_GET['ete']; ?> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td height="17" align="left">ID</td> <td align="left">CALLSIGN</td> <td align="left">CREATOR</td> <td align="left">FROM</td> <td align="left">FROM (ICAO)</td> <td align="left">TO</td> <td align="left">TO (ICAO)</td> <td align="left" sdnum="1033;0;HH:MM">ETE</td> <td align="left">ROUTE</td> <td align="left">DEPARTURE TIME</td> <td align="left">ARRIVAL TIME</td> <td align="left">AIRCRAFT</td> <td align="left">ACTIVE</td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <?php for ( $first_flight; $first_flight <= '12:00'; $first_flight += 10) { ?> <tr> <td><?php echo $start_id+1; ?></td> <td><?php echo $callsign_set+$callsign_start; ?></td> <td>Lorenzo Aiello</td> <td><?php echo $_GET['from']; ?></td> <td><?php echo $_GET['from_icao']; ?></td> <td><?php echo $_GET['to']; ?></td> <td><?php echo $_GET['to_icao']; ?></td> <td> </td> <td> </td> <td> </td> <td> </td> <td><?php echo $_GET['aircraft']; ?></td> <td>Yes</td> </tr> <?php } ?> </table> </body> </html>
Any suggestions?
-
Hello;
I know how to loop if you are using a database query, but im not sure how to loop the amount of times set in a variable
-
The problem isnt with mysql_fetch_array(), it is with mysql_query() not being passed correctly to $result as a resource identifier. Try:
$result = mysql_query("SELECT * FROM airports LIMIT 0, 500") or die(mysql_error());
and see what error does it show.
i followed that, and it worked perfectly thank you
-
yes, i have
-
i get the following error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/monkeypaw201.com/httpdocs/crons/metar_0_500.php on line 13
lines 10-15:
mysql_select_db($database_cron,$cron); $result = mysql_query("SELECT * FROM airports LIMIT 0, 500"); while($row = mysql_fetch_assoc($result)) {
-
It's not an error, it's a warning. Specifically a warning that you have used a variable before it was defined.
And I fail to see what the form code has to do with anything, since it doesn't contain any php at all.
well, ask him, i just posted other lines
Are you sure thats line 89?
Try posting a couple of more lines ( line: 83 - 92)
-
im a bit confused on how functions work..
if i put
<?php function example() { echo "hello world"; }
and farther along the page i put
<?php example() ?>
will that output
hello worldor do i need to put
<php echo example() ?>
?
-
i need to pass ALL variables posted via $_GET, but it varies... so i need something to post all, not just a couple that i set
-
here is the full form
<form method="POST" action="Pages/Add_Ons/Contact/form.php"> <table width="100%" border="0"> <tr> <td>Full Name:</td> <td><span id="sprytextfield1"> <label> <input type="text" name="full_name" id="full_name"> </label> <span class="textfieldRequiredMsg">You Must Enter Your Full Name!</span></span></td> </tr> <tr> <td>E-Mail Address:</td> <td><span id="sprytextfield2"> <label> <input type="text" name="email" id="email"> </label> <span class="textfieldRequiredMsg">You Must Enter Your E-Mail Address!</span></span></td> </tr> <tr> <td>Message:</td> <td><span id="sprytextarea1"> <label> <textarea name="message" id="message" cols="45" rows="5"></textarea> </label> <span class="textareaRequiredMsg">You Must Enter A Message To Send!</span></span></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr><input name="cpage" type="hidden" value="home.php?page=" /> <td colspan="2"><label> <div align="center"> <input type="submit" name="submit" id="button" value="Send Message"> </div> </label></td> </tr> </table> </form>
-
line 89:
<input name="cpage" type="hidden" value="home.php?page=<?php echo $_GET['page']; ?>" />
-
i ran this:
<?php echo $_GET['page']; ?>
on the following page: http://domain.com/index.php?page=home
and got this error
Undefined index: page in /var/www/vhosts/manageyourva.com/httpdocs/Dev/Pages/Add_Ons/Contact/form.php on line 89 -
a CMS is a content management system (ie Joomla, Exponent, Mambo, etc..)
[SOLVED] Error: FTP server reports 550 Could not get file size
in PHP Coding Help
Posted
so.. now it works.. i didn't change anything... weird... i know
anyway thanks hitman6003