Jump to content

TKO

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

TKO's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have this code that will call the page and clear it but what im trying to figure out is how to execute the code only when submit button is pressed. <?php $address = "example.php"; $fp = fopen("$address",'w+'); if(!$fp) echo 'not Open'; //----------------------------------- while(!feof($fp)) { fputs($fp,' ',999); } fclose($fp); ?> Thank you
  2. Thank you all for your reply's winningdave solution worked perfect. Thank you winningdave
  3. wow thanks for the reply's i will try them when i get home. Thank you
  4. hmm i dont see it ?? when i test echo $image1 it shows. the only thing i can think of is echo "$image1"; } else { echo "$image2"; which still shows $image2
  5. thanks for the reply now the code only shows $image2 <?php $image0 = $_SESSION['ls_user']; $image1 = "<img src=img/$image0.png>"; $image2 = "<img src=img/default.png>"; if (file_exists( $image1 )) { echo $image1; } else { echo $image2; } ?>
  6. Hello i am tring to show $image1 if it exists and if not show $image2 This script shows $image1 but if i erase the image it just shows a broken image icon and doesnt go to $image2 any help in this would be great <?php $image0 = $_SESSION['ls_user']; $image1 = "<img src=img/$image0.png>"; $image2 = "<img src=img/default.png>"; if ( $image1 ) { echo $image1; } else { echo $image2; } ?> thank you
×
×
  • 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.