alohatofu Posted April 18, 2007 Share Posted April 18, 2007 Hello, I have a quick question i have the user click on http://sometime.com/page.php I want to send some variables with that url they are $objTask->p('eric') $objTask->p('cuoos') $objTask->p('clli') how would I send them with that page? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/ Share on other sites More sharing options...
Dragen Posted April 18, 2007 Share Posted April 18, 2007 http://sometime.com/page.php?$objTask->p('eric')&$objTask->p('cuoos')&$objTask->p('clli') That should work, although it would send them as a get method, so anyone could input their own values. That might not matter though, depending on what it's for Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232076 Share on other sites More sharing options...
MadTechie Posted April 18, 2007 Share Posted April 18, 2007 i think you mean <?php echo "<a href='http://sometime.com/page.php?eric={$objTask->p['eric']}&cuoos={$objTask->p['cuoos']}&clli={$objTask->p['clli']}' click here </a>" ?> i am assuming its an array so $objTask->p['eric'] and not $objTask->p('eric') page.php echo $_GET['eric']."<br>"; echo $_GET['cuoos']."<br>"; echo $_GET['clli']."<br>"; Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232082 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 thanks for the reply but that didnt' work for me. Ok please allow me to explain further sample code from page: <div id="ftitl"> <div class="flabel"><?php echo $GLOBALS['langForm']['eric']; ?></div> <div id="vtitl"><?php $objTask->p('eric'); ?></div> </div> here is my link on page view.php <a href="javascript:popUp('sendpageadvisory.php')"><font color="orange"><?php echo $GLOBALS['langTaskDetails']['sendadvisorypage']; ?></font></a> sendadvisory.php is a popup window. I want to pull $objTask->p('eric') and $objTask->p('cuoos') and $objTask->p('clli') to the sendpageadvisory.php page. I really appreciate the help Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232122 Share on other sites More sharing options...
MadTechie Posted April 18, 2007 Share Posted April 18, 2007 what about changing sendpageadvisory.php to <?php echo "sendpageadvisory.php?eric=".$objTask->p('eric') ?> Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232137 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 that's giving me the link javascript:popUp('29010sendpageadvisory.php?eric=') Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232139 Share on other sites More sharing options...
MadTechie Posted April 18, 2007 Share Posted April 18, 2007 may wanna double check that, can you post your code Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232140 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 <?php if ( ($objTask->cuoos) >= 8 && ($objTask->priority) ==2) { ?> <li id="tpage"><a href="javascript:popUp('<?php echo "sendpageadvisory.php?eric=".$objTask->p('eric') ?>')"><font color="orange"><?php echo $GLOBALS['langTaskDetails']['sendadvisorypage']; ?></font></a> <?php } elseif ( ($objTask->cuoos) >= 64 ||($objTask->priority) ==1) { ?> <li id="tpage"><a href="javascript:popUp('sendpageoutage.html')"><font color="red"><?php echo $GLOBALS['langTaskDetails']['sendoutagepage']; ?></font></a> <?php } else { } ?> Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232142 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 we're getting close though Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232144 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 29010 is the eric value.. so it parse it right but not at the right order Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232145 Share on other sites More sharing options...
MadTechie Posted April 18, 2007 Share Posted April 18, 2007 only think i can see wrong is the ; missing at the end! <?php <a href="javascript:popUp('<?php echo "sendpageadvisory.php?eric=".$objTask->p('eric'); ?>')"> ?> Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232149 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 I got it.. it's <?php echo "sendpageadvisory.php?eric=".$objTask->eric ?> thank you so much ! you helped a lot Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232164 Share on other sites More sharing options...
alohatofu Posted April 18, 2007 Author Share Posted April 18, 2007 one more question.. how do you put another variable on that line? I couldn't <?php echo "sendpageadvisory.php?eric=".$objTask->eric&&clli=.$objTask->clli ?> Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232170 Share on other sites More sharing options...
rcorlew Posted April 18, 2007 Share Posted April 18, 2007 use & (&) once not twice. THe & is the html code for & and will keep the page valid html. Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232172 Share on other sites More sharing options...
MadTechie Posted April 18, 2007 Share Posted April 18, 2007 <?php echo "sendpageadvisory.php?eric=".$objTask->eric."&clli=".$objTask->clli ?> or is a better standard <?php echo "sendpageadvisory.php?eric=".$objTask->eric."&clli=".$objTask->clli ?> Quote Link to comment https://forums.phpfreaks.com/topic/47552-parsing-from-url/#findComment-232218 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.