>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

PHP and AJAX Poll - php programming file html form ajax function control

 
Registered tutorials: 501
Registered Users: 24391



Rating: 3.36 out of 11 votes cast


  
Category: Ajax and PHP

PHP and AJAX Poll

Digg this   Post to del.icio.us

Abstract: In the AJAX example below we will demonstrate a poll where the web page can get the result without reloading.

This example consists of four pages:
  • a simple HTML form
  • a JavaScript
  • a PHP page
  • a text file to store the results

The HTML Form

This is the HTML page. It contains a simple HTML form and a link to a JavaScript:

<html>
<head>
<script src="poll.js"></script>
</head>
<body>

<div id="poll">
<h2>Do you like PHP and AJAX so far?</h2>

<form>
Yes:
<input type="radio" name="vote"
value="0" onclick="getVote(this.value)">
<br>No:
<input type="radio" name="vote"
value="1" onclick="getVote(this.value)">
</form>
</div>

</body>
</html>

Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 573
Unique Hits: 444


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 1.4 1.7 7.5 10.1 23.7 32.1
Current 2 3 6 7 36 48
Previous 1 1 10 12 40 54
Jul 22 0 0 15 21 0 0
Jul 21 3 3 7 10 57 78
Jul 20 1 1 2 6 47 68
Jul 19 1 1 0 0 17 19
Jul 18 0 0 14 18 0 0
Jul 17 2 4 11 14 7 9
Jul 16 3 3 10 13 23 34
Jul 15 1 1 0 0 10 11
Highest 8 15 32 37 89 113


Script Execution Time: 17.58165 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2