PASSING THE JAVASCRIPT VALUE TO PHP.. HELP!!!
Posted: Thu Oct 27, 2005 1:47 am
feyd | Please use
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
help.. i need to pass the javascript value to php so that it will up date the field in the database... how will i do this?.. any code?.. i'm beginner so sori for my codes.
my codes:Code: Select all
<script type="text/javascript">
function disp_prompt()
{
var $rate=prompt("Enter the Rate you desire.","")
if ($rate!=null && $rate!="")
{
<?php
include ('../includes/config.php');
$query="UPDATE rate SET perhour='+rate+' ";
$result = @mysql_query ($query);
if($result = TRUE)
{
echo 'alert("Successfully change the Rate!! Press F5 refresh the system")';
}
else
{
echo 'alert("An Erro has Occured!!")';
}
?>
}
}feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]