Hi Folks! This is probably an easy one for most of you php people :-)
I've got a PHP form that's working fine, yet after I SEND the form, it goes to a web page with a "Thank You" message on it (ala the php {print} command), ok... what I need to know is (on the backend script following the Thank You message) how can I add a 'link' that when clicked on, the Thank You page will switch back to the main FORM page? Right now, the form stops on the Thank You page and I need to go back to the main area where you fill out info. :-) Thanks!

Zen!

Recommended Answers

All 6 Replies

Hi Folks! This is probably an easy one for most of you php people :-)
I've got a PHP form that's working fine, yet after I SEND the form, it goes to a web page with a "Thank You" message on it (ala the php {print} command), ok... what I need to know is (on the backend script following the Thank You message) how can I add a 'link' that when clicked on, the Thank You page will switch back to the main FORM page? Right now, the form stops on the Thank You page and I need to go back to the main area where you fill out info. :-) Thanks!

Zen!

The easiest way would be to just add an html link to the page. Note that you can easily mix and match php and html on the same page. Just end your php block with a ?> and then print html.

For example...

<?php
  //  Do some form processing here
?>

<a href="index.php">Go back to the Main Page</a>.

You can also use echo (or print I suppose) to output HTML from inside a php code block. To do so, just put the regular HTML in your string.

While doing this, remember that if you quote your string in single quotes, you'll need to escape single quotes that you use in HTML.

For example...

<?php
  //  Do some form processing here
  echo '<a href="index.php">Go back to the main page</a>.';
?>

Good luck,
- Walkere

The easiest way would be to just add an html link to the page. Note that you can easily mix and match php and html on the same page. Just end your php block with a ?> and then print html.

For example...

<?php
  //  Do some form processing here
?>

<a href="index.php">Go back to the Main Page</a>.

You can also use echo (or print I suppose) to output HTML from inside a php code block. To do so, just put the regular HTML in your string.

While doing this, remember that if you quote your string in single quotes, you'll need to escape single quotes that you use in HTML.

For example...

<?php
  //  Do some form processing here
  echo '<a href="index.php">Go back to the main page</a>.';
?>

Good luck,
- Walkere

Hi Walkere :-)
Thanks very much for your timely response. Thanks to your help, I managed to fix the problem and learned something new while I was at it. Great! :-)

:Keith/ZenMartian:

Hi Walkere :-)
Thanks very much for your timely response. Thanks to your help, I managed to fix the problem and learned something new while I was at it. Great! :-)

:Keith/ZenMartian:

No problem. Always glad to help =)

- Walkere

No problem. Always glad to help =)

- Walkere

Hi Again, Walkere...

I've got another situation I'm trying to solve that I'm betting some cool php could really help me pull this off. Okay, So far I've got a nice web-to-sms form working quite well which uses php. One inputs their 10-digit mobile number, selects their carrier (from a drop down menu), then click send, and voila! The individual gets my canned msg (which is merely the url to my mobile site) sent to their mobile phone. Now, what I'd also like to do is have another similar form where as the visitor inputs their 10-digit mobile number, selects their carrier/service provider (from a list of 4 or 5 carrier email adresses), then when the visitor clicks send...the msg is sent directly to my email adress (gmail) where I would receive their information (i.e., 10-digit mobile number + carrier email address).

You see, Walkere... I can see the beauty of the html/php connecting the mobile number with the chosen carrier adress (i.e., '10-digit number@txt.att.net') ala the html drop down menu... yet I cannot figure out how to modify my php to have the info sent, not to the recipients phone, but to where I want it to go...which is my email portal. And when it comes to my email (gmail) I want the msg to read as 'From: 5552125555@txt.att.net'. The end result is for me to garner a mobile subscriber list so I can send sms product updates direct to subscribers phones.

It'll work even if the numbers and carrier email adresses come separate within an email, yet it would be more efficient if they came already strung together (5552125555@txt.att.net). Hope what I'm saying is making sense to you. Thanks!

Keith.

Hi Again, Walkere...

I've got another situation I'm trying to solve that I'm betting some cool php could really help me pull this off. Okay, So far I've got a nice web-to-sms form working quite well which uses php. One inputs their 10-digit mobile number, selects their carrier (from a drop down menu), then click send, and voila! The individual gets my canned msg (which is merely the url to my mobile site) sent to their mobile phone. Now, what I'd also like to do is have another similar form where as the visitor inputs their 10-digit mobile number, selects their carrier/service provider (from a list of 4 or 5 carrier email adresses), then when the visitor clicks send...the msg is sent directly to my email adress (gmail) where I would receive their information (i.e., 10-digit mobile number + carrier email address).

You see, Walkere... I can see the beauty of the html/php connecting the mobile number with the chosen carrier adress (i.e., '10-digit number@txt.att.net') ala the html drop down menu... yet I cannot figure out how to modify my php to have the info sent, not to the recipients phone, but to where I want it to go...which is my email portal. And when it comes to my email (gmail) I want the msg to read as 'From: 5552125555@txt.att.net'. The end result is for me to garner a mobile subscriber list so I can send sms product updates direct to subscribers phones.

It'll work even if the numbers and carrier email adresses come separate within an email, yet it would be more efficient if they came already strung together (5552125555@txt.att.net). Hope what I'm saying is making sense to you. Thanks!

Keith.

so far i can understand is that you want to send the message to your email id. in tht is the case why dont you use mail().

http://in.php.net/mail

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.