954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

results to form field

Hello everyone. I am trying to modify a script I have been working with but have no true knowledge of PHP. Currently the script creates an http post and upon successful sending it opens a new web page and posts a message that reads "Sending results: OK". I would like to have this message show up in a form field in the original page as opposed to opening a new page. Can someone please help me to do this? I would be very appreciative of any assistance I can get. A working version of this can be tried at http://www.coffeebuzz.net/sms/gm/

Attachments gm.zip (52.28KB)
cliffhaas
Newbie Poster
3 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

change $_post to $_request ....

$results = $mysms->send($_POST['to'],$_POST['from'],$message);

and add if ... else

if true ( header('location send.php?Action=OK');

<?php

if ( $_request['Action'] == 'OK' )
{
print "msg sent";
}
else
{
print "bla bla";
}

fatihpiristine
Posting Whiz in Training
283 posts since Sep 2007
Reputation Points: 6
Solved Threads: 19
 

change $_post to $_request ....

$results = $mysms->send($_POST['to'],$_POST['from'],$message);

and add if ... else

if true ( header('location send.php?Action=OK');

<?php

if ( $_request['Action'] == 'OK' ) { print "msg sent"; } else { print "bla bla"; }


How do I specify the form field to print the results to?
BTW, fantastic signature in your post.

cliffhaas
Newbie Poster
3 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

u ve form field as "Customer's Mobile Number" named as "to"
when you post this to send.php
add there
$_request['to'] instead post as you did in ur example.

if you give more details i can help u better.

PS: thanks for that. I love my signature :)

fatihpiristine
Posting Whiz in Training
283 posts since Sep 2007
Reputation Points: 6
Solved Threads: 19
 

I know this makes sense to you but I am quickly lost in the PHP world. If you could edit the code to return the results to a new field in the HTML or back to the existing "to" field I would happily donate to your favorite charity. Even if that charity is you.

cliffhaas
Newbie Poster
3 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You