PHP Applications
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Applications

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 6th, 2007, 04:29 AM
krthk_sg krthk_sg is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: India
Posts: 7 krthk_sg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
have a look at this form and tell me....

can any 1 pls tel me.what is $_isset and $_session and how is it getting called in this form.
<html>
<body>
<?php
require($DOCUMENT_ROOT . "test50.php");
?>
<?php

if (isset($_POST['id']))
{
$_SESSION['id']=$_POST['id'];
//echo $_POST['id'];
$a=$_POST['id'];

$result3= mysql_query("SELECT * FROM `student1` LIMIT $a, 10 ");
if(mysql_num_rows($result3) == 0){
echo "No results Found";
}
else
{
echo "<table border='1'>";
echo "<tr>";
echo "<th>NAME</th><th>ROLLNO</th><th>CLASS</th><th>CONTACTNO</th>";
echo "</tr>";
while($row4 = mysql_fetch_array($result3))
{
echo "<tr>";
echo "<td>".$row4['name'] . "<td>" . $row4['rollno'] . "<td>" .$row4['class'] . "<td>" . $row4['contactno'];
echo "</tr>";
echo "<br />";
}
echo "</table>";

//callfunc($a);
//echo "$a";
echo "<br />";
$a+=10;
echo "<br />";
//echo "$a";
}
}
?>


<?php
if (!isset($_POST['id']))
{
$a=0;
function callfunc($a)
{
$result2 = mysql_query("SELECT * FROM `student1` LIMIT $a, 10 ");
echo "<table border='1'>";
echo "<tr>";
echo "<th>NAME</th><th>ROLLNO</th><th>CLASS</th><th>CONTACTNO</th>";
echo "</tr>";
while($row2 = mysql_fetch_array($result2))
{
echo "<tr>";
echo "<td>".$row2['name'] . "<td>" . $row2['rollno'] . "<td>" .$row2['class'] . "<td>" . $row2['contactno'];
echo "</tr>";
echo "<br />";
}
echo "</table>";
}
callfunc($a);
//echo "$a";
echo "<br />";
$a+=10;
echo "<br />";
//echo "$a";

//echo '<INPUT type="button" value="NEXT" onClick="callfunc($a);" />';
mysql_close($con);
}
?>
<form method="post" action="test55-2.php">
<!-- <INPUT type="button" value="NEXT" onClick='<?$calltofun ?>' />-->
<input type="hidden" name="id" value="<?= $a ?>">
<input type="submit" value="Next">
</form>

</body>
</html>

Reply With Quote
  #2  
Old August 13th, 2007, 02:59 PM
hammer65 hammer65 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Location: Nebraska
Posts: 55 hammer65 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 16 m 53 sec
Reputation Power: 1
$_SESSION is a PHP super global. The contents of the session array is stored in a file in a serialized format, to enable values you set in one page to be accessible in another. In this case an id number (presumably for a database record), is being passed via $_POST to a session variable, so that it can be carried over to other pages.

isset() (not $_isset) is a function that determines if the variable you pass to it is set (declared). If you check a value with isset, you can use what it returns, to avoid notice errors when you try to use a value from a variable in your code that does not yet exist.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Applications > have a look at this form and tell me....


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway