...

View Full Version : Help With Hyperlinking and Running php script



simbarashe
03-11-2007, 05:18 PM
Hie

I was wondering if some1 could please help me I'm am trying to do something similar to what is done in theis forum. I'm using text as a hyperlink and I wanna get the information to run a background script from the same text. as shown below:

PAGE 1
<?php
session_start();
require_once('dbFunction.php');
?>

<td>
<a href="index.php?page=jobSheetDisplay.php">
<?php
$min = 15;
$displayEnteredInfo = displayEnteredInfo($t,$min);
$_SESSION['jobDIdisp'] =$displayEnteredInfo;
echo $_SESSION['jobDIdisp'];
?>
</a>
</td>

The code is quiet a lot so i trimmed it out, The above works perfectly as you can see I have assigned $displayEnteredInfo to a variable becoz i want to use it on the next page I'll go to when I click the hyperlink.Below is the code for the following page.
Page 2

<?php
session_start();
require_once('dbFunction.php');
?>

<td>Job Number<td class="formText">
<?= $_SESSION['jobDIdisp'];>
</td>

It seems as if $_SESSION['jobDIdisp']; is losing its value when I click the hyperlink. Is the a better way I could hyperlink?

Thank you

the-dream
03-11-2007, 05:53 PM
can you post the whole code please?

simbarashe
03-12-2007, 04:34 AM
<?php
session_start();
require_once('dbFunction.php');
?>

<td>
<a href="index.php?page=jobSheetDisplay.php">
<?php
$min = 15;
$displayEnteredInfo = displayEnteredInfo($t,$min);
$_SESSION['jobDIdisp'] =$displayEnteredInfo;
echo $_SESSION['jobDIdisp'];
?>
</a>
</td>

The code is quiet a lot so i trimmed it out, The above works perfectly as you can see I have assigned $displayEnteredInfo to a variable becoz i want to use it on the next page I'll go to when I click the hyperlink.Below is the code for the following page.
<?php
session_start();
require_once('dbFunction.php');
?>

<td>Job Number<td class="formText">
<?= $_SESSION['jobDIdisp'];>
</td>

It seems as if $_SESSION['jobDIdisp']; is losing its value when I click the hyperlink. Is the a better way I could hyperlink?

Thank you



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum