Jump to content

ranjuvs

Members
  • Posts

    135
  • Joined

  • Last visited

    Never

Posts posted by ranjuvs

  1. First of all $details['txtname'] have no value in the first page. If you really want to keep in  session what you typed in the test box then you have to post the values and then set the session variable with the posted value otherwise if you want to display $details['txtname'] value and bring the same to 2nd page then do as follows

     

    <?php
    session_start();
    $details['txtname'] = 'test';
    $_SESSION['txtname'] = $details['txtname'];
    
    ?>
    
    <input type="text" name="txtname" value="<?=$details['txtname']?>" size="45">   </td>
    
    

     

    in the second page

     

    <?php
    session_start();
    ?>
    <p><b>Name:</b>&#160;<?= $_SESSION['txtname']?></p>
    
    

     

     

  2. If see your source

    <title>THAC0 (To Hit Armor Class Zero)</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#000000" text="#cccccc">?>
    
    <link href="CSS/style.css" rel="stylesheet" type="text/css">
    
    <div>
    <link href="../CSS/style.css" rel="stylesheet" type="text/css">
    <div align="center">
    

     

    there are some additional lines that is getting attached

     

    ?>
    
    <link href="CSS/style.css" rel="stylesheet" type="text/css">
    

     

    kindly check where it is coming from

     

  3. try this. TestCookie[txt_user_name] is a variable right?

     

    etcookie(TestCookie[txt_user_name], $txt_user_name, time() + 3600);
    setcookie(TestCookie[txt_user_password], $txt_user_password, time() + 3600);
    [code]
    [code]
    setcookie(TestCookie[txt_user_name],"", $time - 3600);
    setcookie(TestCookie[txt_user_password],"", $time - 3600);
    [code]

    [/code][/code][/code]

  4. $alphabets = array(1=>'a',2=>'b',3=>'c',4=>'d');

    //as you need to print 5 z's at last -> loop the fisrt loop for 5

    for($outer = 1;$outer <= 5;$outer++) {

    foreach($alphabets as $alpha) {

     

    for($i=1;$i<=$outer;$i++)

    print $alpha;

     

    print "\n";

    }

     

    }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.