Professional Web Applications Themes

PHP SMS access database and retreve data - PHP Development

Hi everybody, I'm new at php I am strugling to get something working, my application sends a text message to a gateway and the gateway activates a service which is: [url]http://localhost/2way.php?sender=SENDER&text=FULLSMS[/url] The service takes in the first word in the text message and replies to the user with: echo "I recieved your message : " . _REQUEST['text']; The following is my php code for 2way.php (it is very basic): <? header ("Content-Type: text/plain"); if (isset(_REQUEST['sender'])) { if (isset(_REQUEST['text'])) { echo "Your balance is : " . _REQUEST['text']; } else { echo "ERROR : 'text' parameter missing

Thread: PHP SMS access database and retreve data

r

Thread: PHP SMS access database and retreve data

n" else echo "ERROR : ...

  1. #1

    Default PHP SMS access database and retreve data

    Hi everybody,

    I'm new at php I am strugling to get something working, my
    application sends a text message to a gateway and the gateway
    activates a service which is:


    [url]http://localhost/2way.php?sender=SENDER&text=FULLSMS[/url]

    The service takes in the first word in the text message and replies to
    the user with:

    echo "I recieved your message : " .
    _REQUEST['text'];

    The following is my php code for 2way.php (it is very basic):

    <?

    header ("Content-Type: text/plain");

    if (isset(_REQUEST['sender'])) {
    if (isset(_REQUEST['text'])) {
    echo "Your balance is : " .
    _REQUEST['text'];
    }
    else {
    echo "ERROR : 'text' parameter
    missing\0r\0n"


    else
    echo "ERROR : 'sender' parameter
    missing!\0r\0n"


    ?

    My problem is that I need the application to access
    my databas
    (login), I need to send a text message to the gateway with a
    usernam
    and it sends the username to the 2way php file and the php file
    accesses the database and returns a balance(float) coresponding t
    the
    username, and then sends the balance to the sender!! a
    in " echo "Your
    balance is : "
    _REQUEST['sender']

    I would be very grateful if some
    one could help me with this one
    Thanks for your time
    James.


    ---------------------------------------
    The post originated from PHP
    Freaks
    ---------------------------------------
    [url]http://www.phpfreaks.com[/url]
    [url]http://www.phpfreaks.com/forum[/url]


    jjudge Guest

  2. #2

    Default Re: PHP SMS access database and retreve data

    jjudge spilled the following:
    > Hi everybody,
    >
    > I'm new at php I am strugling to get something working, my
    > application sends a text message to a gateway and the gateway
    > activates a service which is:
    >
    >
    > [url]http://localhost/2way.php?sender=SENDER&text=FULLSMS[/url]
    >
    > The service takes in the first word in the text message and replies to
    > the user with:
    >
    Whoa. Me am confused.

    You want to look up a value in a database using posted parameters. Is that
    what you are asking us? Were you trying to impress us with all this talk
    about SMS and gateways and balances? There are a 1001 tutorials out there
    on how to get a value from a database using MySQL - try Google for
    starters.

    While it is obviously not a 'will you do my college assignment for me' post,
    SMS gateway interfaces are not normally accessible for fun and learning
    which rather suggests you're getting paid to sort this out. I find it
    rather surprising that someone being paid to write a program neither knows
    how to solve the problem nor where to start looking for guidance before
    hitting the newsgroups.

    I'd suggest:

    1) download a copy of the excellent PHP manual from [url]www.php.net[/url] and install
    it somewhere you can access it

    2) try google or search through this newsgroup for basic tutorials

    3) read [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] before looking
    for help on newsgroups

    HTH

    C.
    Colin McKinnon Guest

Similar Threads

  1. Help Outputting data from Access database
    By shanelinke in forum Coldfusion Database Access
    Replies: 0
    Last Post: August 23rd, 05:41 AM
  2. Copying data from one Access database to another
    By Dave Henson in forum Coldfusion Database Access
    Replies: 1
    Last Post: August 10th, 03:11 PM
  3. entering data into MS Access database
    By wwolff in forum Coldfusion Database Access
    Replies: 2
    Last Post: June 14th, 10:45 AM
  4. Need to download data to local access database
    By jv in forum Dreamweaver AppDev
    Replies: 6
    Last Post: April 14th, 09:00 PM
  5. Posting XML data into My Access Database via ASP
    By Gareth Hughes in forum ASP Database
    Replies: 0
    Last Post: July 30th, 12:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •