User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,961 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,992 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 639 | Replies: 5
Reply
Join Date: Sep 2007
Posts: 22
Reputation: ZenMartian is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
ZenMartian ZenMartian is offline Offline
Newbie Poster

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

  #1  
Feb 7th, 2008
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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Posts: 55
Reputation: Walkere is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

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

  #2  
Feb 7th, 2008
Originally Posted by ZenMartian View 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!

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...
  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...
  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
Reply With Quote  
Join Date: Sep 2007
Posts: 22
Reputation: ZenMartian is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
ZenMartian ZenMartian is offline Offline
Newbie Poster

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

  #3  
Feb 9th, 2008
Originally Posted by Walkere View Post
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...
  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...
  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:
Reply With Quote  
Join Date: Jan 2008
Posts: 55
Reputation: Walkere is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

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

  #4  
Feb 9th, 2008
Originally Posted by ZenMartian View Post
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
Reply With Quote  
Join Date: Sep 2007
Posts: 22
Reputation: ZenMartian is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
ZenMartian ZenMartian is offline Offline
Newbie Poster

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

  #5  
Feb 11th, 2008
Originally Posted by Walkere View Post
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.
Reply With Quote  
Join Date: Dec 2007
Location: Bangalore,India
Posts: 118
Reputation: carobee is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
carobee carobee is offline Offline
Junior Poster

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

  #6  
Feb 11th, 2008
Originally Posted by ZenMartian View Post
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
Last edited by carobee : Feb 11th, 2008 at 4:03 am.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 9:12 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC