PDA

View Full Version : مشکل در فون گپ



habibvafapour
یک شنبه 31 خرداد 1394, 16:55 عصر
سلام دوستان
دارم یه برنامه مینویسم که با سرور ارتباط برقرار میکنه
ولی اطلاعات به سرور ارسال نمیشه

<!DOCTYPE html> <html>
<head>
<meta charset="utf-8">
<title>jQuery Mobile Web App</title>
<script src="jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script>


<link href="jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/>


<script src="jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script>
<!-- This reference to phonegap.js will allow for code hints as long as the current site has been configured as a mobile application.
To configure the site as a mobile application, go to Site -> Mobile Applications -> Configure Application Framework... -->
<script src="/phonegap.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(e) {
var a = 'name=habib vafapour';
$.ajax({
type:"POST",
data:a,
url:'www.vitaminpc.ir/habib/habib.php',
success:function(html){$('.m').html(html);}

});

});
</script>
<div class="m" style="height:200px;width:800px; font-size:36px; background-color:#09F; color:#F00; margin:auto"></div>


</body>
</html>



<!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>Untitled Document</title>
</head>


<body>
</body>


<?php
$name=@$_POST['name'];
if (isset($name))
echo $name;
else
echo "خطا";
?>
</html>