results to form field

Reply

Join Date: Oct 2007
Posts: 3
Reputation: cliffhaas is an unknown quantity at this point 
Solved Threads: 0
cliffhaas cliffhaas is offline Offline
Newbie Poster

results to form field

 
0
  #1
Oct 31st, 2007
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/
Attached Files
File Type: zip gm.zip (52.3 KB, 1 views)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 271
Reputation: fatihpiristine has a little shameless behaviour in the past 
Solved Threads: 16
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: results to form field

 
0
  #2
Nov 1st, 2007
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";
}
Do a favour, leave me alone
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 3
Reputation: cliffhaas is an unknown quantity at this point 
Solved Threads: 0
cliffhaas cliffhaas is offline Offline
Newbie Poster

Re: results to form field

 
0
  #3
Nov 1st, 2007
Originally Posted by fatihpiristine View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 271
Reputation: fatihpiristine has a little shameless behaviour in the past 
Solved Threads: 16
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: results to form field

 
0
  #4
Nov 1st, 2007
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
Last edited by fatihpiristine; Nov 1st, 2007 at 12:16 pm.
Do a favour, leave me alone
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 3
Reputation: cliffhaas is an unknown quantity at this point 
Solved Threads: 0
cliffhaas cliffhaas is offline Offline
Newbie Poster

Re: results to form field

 
0
  #5
Nov 1st, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC