Jump to content

Search the Community

Showing results for tags '$_session'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 7 results

  1. Please open to this page and click on the image. It will open to another page whereupon two pop-up light boxes will appear. The goal of the following code is to suppress the pop-ups when, and only when, the image is clicked. Obviously it fails. .htaccess File <IfModule mime_module> <Files overview.html> AddType application/x-httpd-ea-php56 .php .html </Files> </IfModule> this page - http://www.grammarcaptive.com/single_payment_acknowledgment.php <?php session_start(); $_SESSION['perform_nav'] = 1; ?> Target Page - http://www.grammarcaptive.com/overview.html <?php session_start(); ?> <script> var navtype = <?php echo $_SESSION['perform_nav']?>; if(typeof navtype != "undefined" && navtype !== null) { performance.navigation.type === 1; } </script> The Javascript - http://www.grammarcaptive.com/_utilities/javascript/overview.js if (performance.navigation.type === 0) { $.colorbox({opacity: '0.70', transition: 'elastic', speed: 700, width: 700, height: 'auto', scrolling: false, html:"<div id='welcome_slide'> <table> <tr> <td width=250 height='auto'> <img src='_images/freed_captive.png' height=200 width=200 /> </td> <td width=450 height='auto'> <h1>Hi!</h1><h2>My name is Roddy.</h2> <p class='welcome'>This is your gateway out of the prison of bad grammar.</p><p>Let me show you to the final gate!</p></td> </tr> </table> </div>", onClosed: function() { $("iframe.splash").colorbox({iframe: true, fastiframe: false, fixed: false, opacity: "0.65", open: true, rel: 'sweet', width: 700, height: 450, closeButton: true, href: function(){ var href = $(this).attr('src'); return href; } }); }}); } REQUEST: Can you suggest any adjustment that might produce the desired effect? Roddy
  2. 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?
  3. <?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?
  4. 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
  5. 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.
  6. 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.
  7. 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?
  • Create New...