Jump to content

Search the Community

Showing results for tags '$_session'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 6 results

  1. BACKGROUND: Ever since I realized that the $_SESSION superglobal was the future of my podcast page (two-three days ago) I have been diligently exploring the PHP SESSION extension. It is amazing what I discovered. In particular, I am impressed by the tenacity of a user created session and the associated $_SESSION superglobal. Indeed, using the session_write_close( ) function one can not only close a browser window, quit one's browser, open the same page in a new browser, but one can also reboot one's machine, and still, the values of the session variables contained in the $_SESSION superglobal associated with the user_created session are in tact. QUESTION: To where does the session_write_close( ) function write such that it is forever saved, and how does one purge that location short of destroying the entire file, if the location's contents are not unique to the session whose data it is storing?
  2. how to count values?

    <?php if (empty($count)) { $count=''; } if ($count == '') { $count ='1'; } else { $count++ ; } echo $count; echo '<br>'; ?> My goal is to make a script that increments $count ever time someone downloads the page. Can this be done without 'storing' the $count value? Or should I create a script with fwrite/fopen or $_SESSION?
  3. Hi all, I'm trying to execute a query which uses the value from my session which is set when the user logs in. When I try to view the query, it displays nothing. SQL statement // get value of session $username = $_SESSION['username']; // executeable query $sql = ("SELECT * FROM custstock WHERE username = '$username'"); // query $row = mysqli_query($custdb, $sql) or die(mysqli_error($custdb)); The code for my table; <table width="100%" border="1" cellpadding="1" cellspacing="1" class="carInfo"> <tr> <th>ID</th> <th>Vehicle ID</th> <?php while($custveh = mysqli_fetch_assoc($row)){ echo "<tr>"; echo "<td>".$custveh['id']."</td>"; echo "<td>".$custveh['vehID']."</td>"; echo "</tr>"; } ?> </table> Any suggestions would be great, thanks! Jack
  4. when working with $_SESSION and creating a super global then in the script where I use include and call the variable the entire form is showing up. I have to work with $_SESSION, because $_POST or $_GET wont work in this situation. Is there a way to transfer a form value to another script, and then a single value and not the complete form with everything in it.
  5. I have the strangest problem and quite honestly, am completely and utterly mystified by this, so really hoping someone here can help me find a solution. I have a community based game which requires people to sign up and login to use. I use $_SESSION['auth'] and $_SESSION['logname'] and session_start(); at the beginning of every page to correctly get visitors account information and display content based on there account. This has always worked well for me and is working for everyone else currently signed up and myself. However, I have one customer who it works for on all pages, accept one page. On this page, he is meant to see his own wrestling moves within combos and his color theme he selected, but he doesn't. I have tracked the bug down to $_SESSION variables , for some reason on this one page , the $_SESSION variables are blank, which is why no content is showing for him. For the life of me, I can't figure out why $_SESSION variables have values on all other pages for him, but don't on this page, the coding is no different from other pages. Below is the code that is on all pages and works for the customer on all other pages, accept this one page. After the $visitid line there is a lot more coding related to the game, but don't need to show it. the $_SESSION['auth'] and $_SESSION['logname'] are empty on this one page for customer, so the issue is there. session_start();if (@$_SESSION['auth'] == "no"){ $mess = "You must be logged in to view that page."; header("Location: ../index.php?message=$mess"); }if (@$_SESSION['auth'] == "yes"){/*took line out here that gets mysql login info */ $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server.");$db = mysql_select_db($database, $connection) or die ("Couldn't select database");$sql = "SELECT * FROM memberInfo WHERE wrestlerName='{$_SESSION['logname']}'";$result = mysql_query($sql) or die("Couldn't execute query 1.");$row = mysql_fetch_array($result,MYSQL_ASSOC);extract($row);/*Below is variable containing the ID for person viewing the page */$visitID = "$memid";} really hope someone has came across this issue before and can give me a fix, or can point me in a direction of getting a fix, because am really confused on this one. Makes no sense why the $_SESSION variables are setting on every other page but not on one page. Also I have logged into my site via his login details and it worked fine for me.
  6. BackgroundI'm not sure if any of you are familiar with the Paypal APIhttps://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_reference Just looking for advice in best practices, security, technical, etc, context regarding the topic title. FlowAs part of the Express Checkout flow, after a user chooses to checkout with Paypal from my clients site (by adding to cart from products in the 1000BC Store)http://www.1000-bc.com/products.php I make an AJAX request to the server to a PHP script which creates an instance of a Paypal class I created, populates it with the products and their properties (amount, description, etc) and I make a method call which upon success, returns a TOKEN I can use to redirect the user to paypal's site so that they can initiate the Express Checkout flow (i.e. review their order, login, pay, etc). After this, the user is redirected back to my site, to a separate checkout page, which handles the follow up methods that I need to call/make against the Paypal API in order to complete the transaction. The QuestionAfter the first AJAX request is made and I get the initial success TOKEN, I save the Paypal class instance in $_SESSION so that I have access to the classes state on the checkout page. Per paypal's recommendation, they suggest that for the follow up calls, the same information should be used as in the first call that returns the TOKEN. Rather than recreate the class on the checkout page and repopulate it again, is saving the class instance in $_SESSION okay? The only edge case I can invision is the user taking so much time checking out with Paypal that by the time they are redirected back to my site, their $_SESSION may have expired. Thoughts, advice?
×