sydneyguy
asked on
open a url from a tpl file after correct syntax for the brackets as not to confuse the php compiler
{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'}
{* 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'}
ASKER
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
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
Do you wish open that link in a new tab/window or in the same tab/window?
ASKER
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
What about
if ($smarty.session.ProSchBth == 'P'){
header("location: http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1");
}elseif...
if ($smarty.session.ProSchBth
header("location: http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1");
}elseif...
ASKER
did not run, just echo on the page, so this bit of code did not run
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What about?
Sorry, can you give some feedback, please?
ASKER
sorry about that got side tracked
thanks for the help
thanks for the help
Glad to help you and thanks for points. Bye
if ($smarty.session.ProSchBth
echo '<a href="http://localhost/home/hiv/public_html/advprovideredit.php?search_new=1" target="_blank">HTML Help</a> ';
}elseif...