SlideShare una empresa de Scribd logo
1 de 1
<?php

functionprintTitle()
{
        return "Archived Weather Records";
}

function run($dbname, $link)
{

  /* Run the query on the database through the connection */
  $query = "select * from weatherdata_archive";
  $result_array = mysql_db_query($dbname, $query, $link);

print "<h2>Old weather data table</h2>";
  ?>
<form action="list_weather_data_old.php" method="post">
        <p>SearchBy ID: <input type="text" name="searchid" size="15" maxlength="20"
value="" />
        <input type="submit" name="submit" value="Search" /></p><br/>       <br/>
</form>
<?php



print "<table border=0>
<tr>
<th align=left>Data ID</th>
<th align=left>Data/time</th>
<th align=left>Node ID</th>
<th align=left>Outdoor Temp</th>
<th align=left>Indoor Temp</th>
<th align=left>Humidity</th>
<th align=left>Wind Speed</th>
        <th align=left>Airpressure</th>
        <th align=left>Wind direction</th>
        <th align=left>Rainfall</th>
        <th align=left>Wind Chill</th>
</tr>n";

  /* While there are still rows in the result set,
assign the current row to the array $row */
while ($row = mysql_fetch_assoc($result_array))
  {
print "t<tr>n";
    /* Print out each element in row, that is,
print the values of the attributes */
foreach ($row as $col_value)
    {
print "tt<td>$col_value</td>n";
    } // end for
print "t</tr>n";
  } // end while

print "</table>n";
mysql_free_result($result_array);
}

?>

Más contenido relacionado

La actualidad más candente (12)

HeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientHeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP Client
 
Web client security
Web client securityWeb client security
Web client security
 
ZH爱丽丝梦游仙境
ZH爱丽丝梦游仙境ZH爱丽丝梦游仙境
ZH爱丽丝梦游仙境
 
PowerCMS X
PowerCMS XPowerCMS X
PowerCMS X
 
次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
 
Intro to sencha touch
Intro to sencha touchIntro to sencha touch
Intro to sencha touch
 
Mongo db for C# Developers
Mongo db for C# DevelopersMongo db for C# Developers
Mongo db for C# Developers
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
 
Into The Box 2018 cf fractal
Into The Box 2018  cf fractal Into The Box 2018  cf fractal
Into The Box 2018 cf fractal
 
Mongo db for c# developers
Mongo db for c# developersMongo db for c# developers
Mongo db for c# developers
 
Integration with Camel
Integration with CamelIntegration with Camel
Integration with Camel
 

Destacado (8)

Xxxxxxxx
XxxxxxxxXxxxxxxx
Xxxxxxxx
 
Organización p lm 2012
Organización p lm 2012Organización p lm 2012
Organización p lm 2012
 
P 74-75
P 74-75P 74-75
P 74-75
 
Vaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de gamesVaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de games
 
Carrera de submarinos
Carrera de submarinosCarrera de submarinos
Carrera de submarinos
 
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
 
P 46-47
P 46-47P 46-47
P 46-47
 
Periclesdruck 70anos
Periclesdruck 70anosPericlesdruck 70anos
Periclesdruck 70anos
 

Similar a Phpfunction

Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
mrcoffee282
 

Similar a Phpfunction (20)

Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
Php
PhpPhp
Php
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
 
Php (1)
Php (1)Php (1)
Php (1)
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
JS-05-Handlebars.ppt
JS-05-Handlebars.pptJS-05-Handlebars.ppt
JS-05-Handlebars.ppt
 
Zero to SOLID
Zero to SOLIDZero to SOLID
Zero to SOLID
 
Karan chanan
Karan chananKaran chanan
Karan chanan
 
Karan - form search
Karan - form searchKaran - form search
Karan - form search
 
SULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programsSULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programs
 
Soa lab 3
Soa lab 3Soa lab 3
Soa lab 3
 
Django quickstart
Django quickstartDjango quickstart
Django quickstart
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Ip lab
Ip labIp lab
Ip lab
 
Md5 decrypter
Md5 decrypterMd5 decrypter
Md5 decrypter
 
Php summary
Php summaryPhp summary
Php summary
 
Analysis
AnalysisAnalysis
Analysis
 

Más de shailendra vishwakarma (6)

Adv html
Adv htmlAdv html
Adv html
 
Essell infracon pvt ltd
Essell infracon pvt ltdEssell infracon pvt ltd
Essell infracon pvt ltd
 
Content management system overview
Content management system overviewContent management system overview
Content management system overview
 
Adv html
Adv htmlAdv html
Adv html
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Using class suffixes
Using class suffixesUsing class suffixes
Using class suffixes
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Phpfunction

  • 1. <?php functionprintTitle() { return "Archived Weather Records"; } function run($dbname, $link) { /* Run the query on the database through the connection */ $query = "select * from weatherdata_archive"; $result_array = mysql_db_query($dbname, $query, $link); print "<h2>Old weather data table</h2>"; ?> <form action="list_weather_data_old.php" method="post"> <p>SearchBy ID: <input type="text" name="searchid" size="15" maxlength="20" value="" /> <input type="submit" name="submit" value="Search" /></p><br/> <br/> </form> <?php print "<table border=0> <tr> <th align=left>Data ID</th> <th align=left>Data/time</th> <th align=left>Node ID</th> <th align=left>Outdoor Temp</th> <th align=left>Indoor Temp</th> <th align=left>Humidity</th> <th align=left>Wind Speed</th> <th align=left>Airpressure</th> <th align=left>Wind direction</th> <th align=left>Rainfall</th> <th align=left>Wind Chill</th> </tr>n"; /* While there are still rows in the result set, assign the current row to the array $row */ while ($row = mysql_fetch_assoc($result_array)) { print "t<tr>n"; /* Print out each element in row, that is, print the values of the attributes */ foreach ($row as $col_value) { print "tt<td>$col_value</td>n"; } // end for print "t</tr>n"; } // end while print "</table>n"; mysql_free_result($result_array); } ?>