We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

open a url from a tpl file after correct syntax for the brackets as not to confuse the php compiler

Medium Priority
312 Views
Last Modified: 2012-05-11
{if $smarty.session.ProSchBth == 'P'}
{* HERE I NEED IT TO OPEN http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1 *}
{* {include file='user_home_stats.tpl'} *}
{* THIS IS WHAT IT DOES NOW WHEN IT RUNS *}
{include file='advprovideredit.tpl'}

{* BUT I NEED IT TO OPEN THIS LINK BELOW INSTEAD BUT NOT SURE OF THE SYNTAX TO PUT
ROUND THE URL LINK *}
<a href="http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1" target="_blank">HTML Help</a>

{elseif $smarty.session.ProSchBth == 'S'}
Comment
Watch Question

Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
I'm not sure to have understood your question. Want you the right code to print a link if $smarty.session.ProSchBth == 'P'? If so, take a look at this:

if ($smarty.session.ProSchBth == 'P'){
  echo '<a href="http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1" target="_blank">HTML Help</a> ';
}elseif...

Author

Commented:
that give me a link that works but i want it to just open the page insted of the link,
as it is on open the page for the tpl auto loads
but i need the php page to be called and auto load in stead.
so instead of a link i need it to just load the page instead
thanks for the help so far
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Do you wish open that link in a new tab/window or in the same tab/window?

Author

Commented:
same window just when the page is opened depending on the if statment it will auto open the page in the same window, but if i get he syntax for the page running i can play with the rest
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
What about

if ($smarty.session.ProSchBth == 'P'){
  header("location: http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1");
}elseif...

Author

Commented:
did not  run, just echo on the page, so this bit of code did not run

Author

Commented:
page shot
Freelancer
CERTIFIED EXPERT
Top Expert 2010
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
What about?
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Sorry, can you give some feedback, please?

Author

Commented:
sorry about that got side tracked
thanks for the help
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Glad to help you and thanks for points. Bye
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.