Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-23-2002, 02:15 PM   #1 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
isset trouble

I want the ECHO to remain, but it dissapears when I set $value2. Any ideas?

if (isset($value1)){
echo "please Stay!"
}

...and later on

if (isset($value2)){
echo "nope, sorry!"
}
rockyracoon is offline   Reply With Quote
Old 07-23-2002, 03:14 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
A bit more code or explaining of what you want to achieve would be helpful..

The thing you can't get to work is it anything like this:
PHP Code:
<html>
<?php
  
if(isset($value1))
      echo 
"Welcome to ";
?>
My place is so rocking.. And I'm

<?php
  
if(isset($value2))
    echo 
" Sorry ";
?>
with ....
</html>
or is it anything like
PHP Code:
<html> 
<?php
if(isset($value1))
{
  echo 
"Welcome to ";
  
unsset($args);
}
?>
My site is so rocking... An I'm 
<?php
if(isset($value2))
  echo 
" Sorry ";
?>
with...
</html>
Because the last one, will not have a $value2 in it, since you've unset every argument parsed to the page..

But as I started out with, a few more lines or explaining will sure help the understanding of why/how you are trying this..
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 07-23-2002, 03:54 PM   #3 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
wow, i just fihured it out. THANKS FOR YOUR HELP< I LOVE YOU!!!!!!!!!!!!
rockyracoon is offline   Reply With Quote
Old 07-23-2002, 04:17 PM   #4 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
Uh-oh.... i was wrong. heres the code:

if (isset($clicked) && $value == "1"){
mysql_query("INSERT INTO popfiller (desc) VALUES ('$desc')");
$cell1 = "yes";
}
if (isset($cell1)){
echo "this will dissapear";
}
echo "
----------------HTML HERE----------------
";
if (isset($clicked) && $value == "1"){
mysql_query("INSERT INTO popfiller (desc) VALUES ('$desc')");
$cell2 = "yes";
}
if (isset($cell2)){
echo "when this appears";
}
rockyracoon is offline   Reply With Quote
Old 07-23-2002, 05:46 PM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
Why not have:
PHP Code:
<?php
echo "<html><body><!-- other settings -->";
if (isset(
$clicked) && $value == "1"){
mysql_query("INSERT INTO popfiller (desc) VALUES ('$desc')");
$cell1 "yes";
}
if (isset(
$cell1)){
echo 
"this will dissapear";
}
echo 
"
Other html part of the page...
"
;
if (isset(
$clicked) && $value == "1"){
mysql_query("INSERT INTO popfiller (desc) VALUES ('$desc')");
$cell2 "yes";
}
if (isset(
$cell2)){
echo 
"when this appears";
}
Since if you have the <html> in the ----HTML HERE--- it will send a header to the browser, instructing it to expect the rest of the page as HTML where the "this will.." part is expected as raw text.

Since we know, every thing send from the page, is as html, we might aswell instruct the viewer that this will be html, and avoid any possible error in that part.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Explorer trouble (of course) easilyi HTML, XML, Javascript, AJAX 6 11-11-2004 03:59 PM
Brain Melting: Trouble With If Statements..... UnusualGameBoy Java 3 10-27-2004 02:10 PM
cygwin trouble Imon Fyre Linux / BSD / OS X 4 03-27-2003 06:13 PM
trouble with some image upload code trevor PHP 11 02-11-2003 07:09 AM
narrowed down login trouble trevor PHP 7 01-18-2003 05:50 PM


All times are GMT -8. The time now is 01:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting