943,645 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 10482
  • PHP RSS
Feb 7th, 2008
0

Add a Link into PHP web page...How To??

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ZenMartian is offline Offline
22 posts
since Sep 2007
Feb 7th, 2008
0

Re: Add a Link into PHP web page...How To??

Click to Expand / Collapse  Quote originally posted by ZenMartian ...
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 Syntax (Toggle Plain Text)
  1. <?php
  2. // Do some form processing here
  3. ?>
  4.  
  5. <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 Syntax (Toggle Plain Text)
  1. <?php
  2. // Do some form processing here
  3. echo '<a href="index.php">Go back to the main page</a>.';
  4. ?>

Good luck,
- Walkere
Reputation Points: 29
Solved Threads: 5
Junior Poster in Training
Walkere is offline Offline
57 posts
since Jan 2008
Feb 9th, 2008
0

Re: Add a Link into PHP web page...How To??

Click to Expand / Collapse  Quote originally posted by 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 Syntax (Toggle Plain Text)
  1. <?php
  2. // Do some form processing here
  3. ?>
  4.  
  5. <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 Syntax (Toggle Plain Text)
  1. <?php
  2. // Do some form processing here
  3. echo '<a href="index.php">Go back to the main page</a>.';
  4. ?>

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:
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ZenMartian is offline Offline
22 posts
since Sep 2007
Feb 9th, 2008
0

Re: Add a Link into PHP web page...How To??

Click to Expand / Collapse  Quote originally posted by 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
Reputation Points: 29
Solved Threads: 5
Junior Poster in Training
Walkere is offline Offline
57 posts
since Jan 2008
Feb 11th, 2008
0

Re: Add a Link into PHP web page...How To??

Click to Expand / Collapse  Quote originally posted by 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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ZenMartian is offline Offline
22 posts
since Sep 2007
Feb 11th, 2008
0

Re: Add a Link into PHP web page...How To??

Click to Expand / Collapse  Quote originally posted by ZenMartian ...
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().
Last edited by carobee; Feb 11th, 2008 at 5:03 am.
Reputation Points: 10
Solved Threads: 12
Posting Whiz in Training
carobee is offline Offline
209 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Please help on links
Next Thread in PHP Forum Timeline: want to retreave data from tables after joining them using "join".





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC