• 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

Viewing 8 replies - 1 through 8 (of 8 total)
  • jack randall

    (@theotherlebowski)

    what are you trying to do? collect user information?

    Thread Starter Jack Lee Beng Hwee

    (@jack-lee-beng-hwee)

    Yes you are right. I want to collect users’ info then insert into my “user” database. My android apps will then perform login check based on the users’ info which is added in the database.
    Thanks
    Jack

    jack randall

    (@theotherlebowski)

    where does the android app bit fit into all of this? what’s it doing and why?

    Thread Starter Jack Lee Beng Hwee

    (@jack-lee-beng-hwee)

    The brief explanation is like this:
    I want to create an apps and this app need login. After user enter their login name and pass, my apps codes will pass these info to my another php script (let say login_check.php) via json. My login_check.php will then search from the user_database (A database to store all users info) to validate the username and password. If the enter username or password is not found from database, the user is not able to login.

    This app will be managed by my client eventually. So I want to create a webpage to allow my client has the right to add or remove user’s name and password. I have no problem to do the removal part as I manage to use “Forget About Shortcode Buttons” to call out my another php file {user_removal.php) and this php file will do the removal job.

    Now the difficulty is to add user. I have a php script for adding user and the partial codes are already posted at my first post. “Forget About Shortcode Buttons” is able to call my php script but unfortunately, it cant help to pass the contents to the php file (contents here are username, user ID and etc which are entered by my client). So I need a way to help me do this job.

    In summary, I need to create an empty text box, my client can type in the contents, and the contents are able to be passed into my php script, then my php script will do the rest of the stuffs.

    Thanks
    Jack

    jack randall

    (@theotherlebowski)

    ultimately do you want people to be able to login into your wordpress site via an android app?

    there’s already a wordpress app for android that you can link directly to a site. if you give your client admin access to the site they can manually add or delete users from the dashboard. users can register at the site and your client can remotely use the wordpress app to manage users.

    use a profile building plugin to add extra info to the profile and you’re done. no need to re-invent the wheel, it already does what you’re trying to do.

    Thread Starter Jack Lee Beng Hwee

    (@jack-lee-beng-hwee)

    >>>>ultimately do you want people to be able to login into your wordpress site via an android app?

    My apps is not to login into my wordpress but my apps is doing other application. But the login information (username, pass) is stored inside sql database and I want to use wordpress to add or remove these iformation.

    BTW, let me let me look into profile building plugin. Thanks for your suggestion.

    jack randall

    (@theotherlebowski)

    sounds like you don’t need wordpress at all you just need a database. having wordpress do this for you is overkill, if all you need is a database with details and the ability to verify people’s accounts.

    http://www.rackspace.com/managed_hosting/services/database/mysql/

    Thread Starter Jack Lee Beng Hwee

    (@jack-lee-beng-hwee)

    Hi Jack, now I am using html to code my webpage. Thank for hinting me wordpress is not a correct direction to serve my project description.
    HTML coding everything work fine to me 🙂
    Thanks
    AGain!
    Best regard
    Jack

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Parameters Passing from WordPress Page to my PHP script’ is closed to new replies.