Parameters Passing from WordPress Page to my PHP script
-
Hi guys,
I have a php file is created and this php file is stored under /var/www/html
The php contents are similar as below:<?php
$host=’xxx.xxx.xxx.xxx’;
$uname=’xxxxxx’;
$pwd=’xxxxx’;
$db=”xxxxxx”;#set up mysql connection
$con = mysqli_connect ($host,$uname,$pwd,$db);mysqli_query($con, “INSERT INTO
xxxxx
.yyyy
(
name
,
ID
,
phone_number
)
VALUES (
‘jack’, ‘123’, ‘011xxxxxxxx’
)”);
……………………….
………………………..Now I wish to add a “send” button and an “Edit Text Box” in my wordpress page to allow user enter their name, ID and phone number. Then i can convey those contents to my php script when user hit “send” button.
Instead of
VALUES (
‘jack’, ‘123’, ‘011xxxxxxxx’
)”);
what I want is:
VALUES (
‘$name’, ‘$ID’, ‘$phone’
)”);which $name, $ID and $phone are received from wordpress.
I want this works like what I have done in Android project when I use json pass data from android files to php script.
Any suggestion?
I try to search from Google but I can’t really get what I want. I hope somebody can guide me this 🙂Thanks
Jack
- The topic ‘Parameters Passing from WordPress Page to my PHP script’ is closed to new replies.