ajax remotecall,php - AJAX to call remote files - Stack Overflow

this is my poll code

i'm getting data in Mysql

Student Performa

Department:

Department

Computer Science

Zoology

Degree

Degree

Computer Science

Chemistry

BBA

Semester

semester

FIRST (01)

SECOND (02)

THIRD (03)

FOURTH (04)

FIFTH (05)

SIX (06)

SEVEN(07)

EIGHT (08)

Study Year

Select_year

2014

2013

2012

2011

2010

Faculty

Faculty

Science

Arts

1. The work in the Program is too Heavy and induces a lot of

pressure

very satisfied

satisfied

uncertain

and this is my PHP code

$db_name="performa"; // your database name

$con=mysql_connect("$host", "$username", "$password")or die("cannot connect"); //mysql connection

mysql_select_db("$db_name")or die("can not select DB"); //select your database

error_reporting(E_ALL ^ E_NOTICE);

$depart = $_POST['depart'];

$degree = $_POST['degree'];

$semester = $_POST['semester'];

$study_year = $_POST['study_year'];

$faculty = $_POST['faculty'];

$query = "INSERT INTO performa1 (depart,degree,semester,study_year,faculty) VALUES ('$depart', '$degree', '$semester', '$study_year', '$faculty')";

mysql_query($query) or die('Query "' . $query . '" failed: ' . mysql_error());

// name, email and address are fields of your fields; test your table. $name, $email and $address are values collected from the form

?>

this is working fine in website but i want to use it in intel xdk and intel xdk dont support PHP/Mysql but we can do it with AJAX with JQUERY call PHP file

i'm trying to do it but i dont know how to do it correctly

so can anyone tell me where to place PHP file and how to do it with AJAX or different procedure

i just want to get the data into database

Thanks

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值