Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2005, 11:28 PM
Registered User
 
Join Date: Feb 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can I get the int value from Session[" "]

the session[" "] returns object,so how can I get the int value and use it in a calulation?

thanks

 
Old February 8th, 2005, 03:33 AM
Authorized User
 
Join Date: Feb 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you use with php5 use this code:
<?php
     session_start();
     session_register("x");
     session_register("y");
     $_SESSION["x"]=1;
      $_SESSION["y"]=4;
$sum= $_SESSION["x"]+ $_SESSION["y"];
echo "the Sum of X amd Y is:$sum";
?>
 
Old February 8th, 2005, 03:38 AM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I couldn't understand what you meant by saying session[" "] returns object

My suggessions

Just check for isnumeric()
And if it is true then go on converting it to int (using int() ot cint()).



Shibu Narayanan
Software Associates





Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting int to byte yukijocelyn C# 2005 1 May 30th, 2008 03:44 AM
chap 2 about trap INT speedwolf BOOK Beginning Linux Programming, 3rd Edition 0 March 13th, 2008 01:02 AM
Reading An int Doom C# 1 January 7th, 2008 01:43 PM
int? asn187 C# 2 March 30th, 2007 06:05 AM
Convert a char to int!!!!?? vtvb C++ Programming 6 March 18th, 2006 05:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.