Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With Hyperlinking and Running php script

    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
    Last edited by simbarashe; 03-13-2007 at 03:37 AM. Reason: Clarifying the question

  • #2
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts
    can you post the whole code please?

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <?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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •