Jump to content
php.lv forumi

isset neiet


Lejnieks

Recommended Posts

if (isset($_SESSION['xxx'])) {

echo "viss ok";

} else {

echo "nav ievadiits";

}

 

 

bet ja neievadu vērtību tik un taa raada ka viss ok, ko lai dara?

 

ja tu piemēram raksti:

 

$a = ''; //tukšums

tad isset($a) atgriezīs TRUE, jo vērtību tu ESI PIEŠĶĪRIS.

 

uztaisi $unset($a)

tad isset($a) atgriezīs FALSE, jo mainīgais būs nodzēsts.

Link to comment
Share on other sites

Ko nozīmē neievadu vērtību?

bija domaats, ka ja textbox tiek ierakstiita veertiiba un veelaak to POST un saglabaa kaa sesiju, tad gan ierakstot skaitli gan neierakstot uzraada ka ir viss ok..

 

buutiibaa kaa login tips, kur neielogojoties uzraada ka nav ielogojies.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...