Search Results

Search found 15797 results on 632 pages for 'session variables'.

Page 82/632 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • PHP Session data not being saved

    - by Crackerjack
    I have one of those "I swear I didn't touch the server" situations. I honestly didn't touch any of the php scripts. The problem I am having is that php data is not being saved across different pages or page refreshes. I know a new session is being created correctly because I can set a session variable (e.g. $_SESSION['foo'] = "foo" and print it back out on the same page just fine. But when I try to use that same variable on another page it is not set! Is there any php functions or information I can use on my hosts server to see what is going on? Here is an example script that does not work on my hosts' server as of right now: <?php session_start(); if(isset($_SESSION['views'])) $_SESSION['views'] = $_SESSION['views']+ 1; else $_SESSION['views'] = 1; echo "views = ". $_SESSION['views']; echo '<p><a href="page1.php">Refresh</a></p>'; ?> The 'views' variable never gets incremented after doing a page refresh. I'm thinking this is a problem on their side, but I wanted to make sure I'm not a complete idiot first. Here is the phpinfo() for my hosts' server (PHP Version 4.4.7):

    Read the article

  • How to print contents from a session variable by looping in a foreach statement

    - by itsover9000
    im trying to write a code where can print and loop through the contents of my session variable by using a foreach statement here is my code <form class="form form-inline" method = "post" action="reportmaker.php"> <select name="rfield"> <option value="">--Select Field--</option> <?php $sc2=mysql_query("SELECT * from searchcolumn s left join report_fields r on s.scol_id=r.field_id where s.category != 'wh'"); foreach($sc2 as $sc){ ?> <option value="<?php echo $sc[advsearch_col]; ?>"><?php echo $sc[advsearch_name]; ?></option> <?php } ?> </select> <button type="submit" value = "submit" id="add" name="add" class="btn pull-right">Add More</button> </form> <?php if(isset($_POST['add'])) { $_SESSION['temp'][]=$_POST['rfield']; } if($_SESSION[temp][]!=""){ foreach($_SESSION[temp][] as $temp) { echo $temp; } } ?> the error that appears with this code is Fatal error: Cannot use [] for reading the line where the error is is this if($_SESSION[temp][]!=""){ i need to print the contents of the session array and this is the only way i know how is there a way to fix this? thanks =========EDIT thanks for the answers guys i finally got it

    Read the article

  • Setting PHP session variables using Flash Actionscript

    - by Abs
    Hello all, I have a simple PHP upload script that is called from my Flash App. I am sure it makes the call because it actually uploads the file! session_start(); $default_path = 'files/'; $target_path = ($_POST['dir']) ? $_POST['dir'] : $default_path; if(!file_exists($target_path)) mkdir($target_path, 0777, true); $destination = $target_path . basename( $_FILES[ 'Filedata' ][ 'name' ] ); $file_name = rand(1,9999).$_FILES[ 'Filedata' ][ 'name' ]; if(move_uploaded_file($_FILES[ 'Filedata' ][ 'tmp_name' ], $destination)){ $_SESSION['path'] = 'flashuploader_online/upload/'.$destination; } However, I try to use the session variable "path" in another script but it gives me an empty value! Yes, I have made sure to use session_start. Am I missing something? Update At least now I know what the problem is! But I am not sure how to solve it without it getting messy to pass across session variables. Any ideas?

    Read the article

  • Core Data to-many relationship in code

    - by Jan Bezemer
    I have three entities: Session, User and Test. A session has 0-many users and a user can perform 0-6 tests. (I say 0 but in the real application always at least 1 is required, at least 1 user for a session and at least 1 test for a user. But I say 0 to express an empty start.) All entities have their own specific data attributes too. A user has a name, A session has a name, a test has six values to be filled in by the user, and so on. But my issue is with the relationships. How do I set multiple users and have them added to one session (same goes for multiple tests for one user). How do I show the content in a right way? How do I show a session that has multiple users and these users having completed multiple tests? Here's my code so far with regard to issue 1: Session *session = [NSEntityDescription insertNewObjectForEntityForName:@"Session" inManagedObjectContext:context]; session.name = @"Session 1"; User *users = [NSEntityDescription insertNewObjectForEntityForName:@"User" inManagedObjectContext:context]; users.age = [NSNumber numberWithInt:28]; users.session = session; //sessie.users = users; [sessie addUserObject:users]; With regard to issue 2: I can log the session, but I can't get the user(s) logged from a session. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Session" inManagedObjectContext:context]; [fetchRequest setEntity:entity]; NSArray *fetchedObjects = [context executeFetchRequest:fetchRequest error:&error]; for (Session *info in fetchedObjects) { NSLog(@"Name: %@", info.name); NSLog(@"Having problems with this: %@",info.user); //User *details = info.user; //NSLog(@"User: %@", details.age); }

    Read the article

  • Les Variables de plus en plus proches du CSS, WebKit commence à les supporter de manière expérimentale

    Les Variables de plus en plus proches du CSS WebKit commence à les supporter de manière expérimentale L'équipe de WebKit, le moteur de rendu utilisé entre autres par Chrome et Safari, va supporter de manière expérimentale une des avancées les plus attendues (et fondamentales ?) du CSS : les variables. Jusqu'ici, seules des alternatives (comme less.js) permettaient d'utiliser ces variables dans des feuilles de style. Problème, ces « tours de passe-passe » demandent une phase de compilation. La solution du W3C, qui sera donc très prochainement supportée par le build Canary de Chrome et plus largement par les Nightly Builds de Webkit, est beaucoup plus simple.

    Read the article

  • Windows Batch Script to Replace Environment Variables in a File

    - by skb
    Hi. I want to write a batch file that will take the contents of a file, and replace any environment variable references inside the file with the actual environment variable values. Is this possible? Basically, if a file had this: %PROGRAM FILES%\Microsoft SQL Server\ then I would want the file contents to become: C:\Program Files\Microsoft SQL Server\ after the batch script ran. This is just one example, but I want ALL environment variables to be expanded. Thanks in advance for any help!

    Read the article

  • Global variables in Eclipse RCP

    - by Raven
    Hi, how do i solve this: I have usercredential informtion in my main RCP plugin. All other plugins should have that information as well. Preference Store is not possible, because also the presference store needs a nodename which needs to be globally available. Are there any possibilities to realize global variables? Thanks!

    Read the article

  • How to get/obtain Variables from URL in Flash AS3

    - by Leon
    So I have a URL that I need my Flash movie to extract variables from: example link: http://www.example.com/example_xml.php?aID=1234&bID=5678 I need to get the aID and the bID numbers. I'm able to get the full URL into a String via ExternalInterface var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url; Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers. Appreciate any tips, links or help with this!

    Read the article

  • How to display variables in Taglist window in vim

    - by Yogesh Arora
    I am using Taglist plugin in vim. In the taglist window i can see tags like namespaces, classes, struct, function but not variables. I saw a screenshot(attached below) on Taglist website which had this info. I am using Vim 7 and Exuberant Ctags 5.8, and i have generated my ctags using this command ctags --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++

    Read the article

  • What's the pythonic way of declaring variables?

    - by the_drow
    Usually declaring variables on assignment is considered a best practice in VBScript or JavaScript , for example, although it is allowed. Why does Python force you to create the variable only when you use it? Since Python is case sensitive can't it cause bugs because you misspelled a variable's name? How would you avoid such a situation?

    Read the article

  • How to pass URL variables into a WordPress page

    - by mikemick
    This has been asked on here (over a year ago), but apparently not answered, and WordPress is always evolving so maybe theres a good solution now. I want to pass variables to a WordPress page via the url (similar to CodeIgniter uri helper segments). Currently I can do this... My profile page is: http://website.com/profile I can pass a variable like this: http://website.com/profile?username=johndoe I want to pass the variable in like this: http://website.com/profile/johndoe There has to be some sort of helper function, right?

    Read the article

  • Safety using $_SERVER variables

    - by DiogoNeves
    Hi all, I'm working on a system that relies in $_SERVER['REMOTE_ADDR'] to get the user address and check it against a white list of addresses. Is this approach safe? Or is there a way of forcing values in superglobal variables? Thank you, Diogo

    Read the article

  • How to dispose of variables in windows close button

    - by cmrhema
    Hi, I have a windows forms application, where I have declared some static variables. On the click of exit button, I have disposed of some datatable which i have declared static. Many a times the user instead of clicking the exit button, will just exit the windows application by clicking the X button on the left corner top. What should be done to ensure that even if the user clicks the X button, everything is disposed of properly. Thanks Regards Hema

    Read the article

  • How to take URL and split/string to get URL variables in Flash AS3

    - by Leon
    So I have a URL that I need my Flash movie to extract variables from: example link: http://www.example.com/example_xml.php?aID=1234&bID=5678 I need to get the aID and the bID numbers. I'm able to get the full URL into a String via ExternalInterface var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url; Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers. Appreciate any tips, links or help with this!

    Read the article

  • Invalid parameter number: number of bound variables does not match number of tokens

    - by Alex
    I have a table: 'objects' with few columns: object_id:int, object_type:int, object_status:int, object_lati:float, object_long:float My query is : $stmt = $db->query('SELECT o.object_id, o.object_type, o.object_status, o.object_lati, o.object_long FROM objects o WHERE o.object_id = 1'); $res = $stmt->fetch(); Pdo throw error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens When i remove column object_lati or object_long query is work fine.

    Read the article

  • Is memory leak caused by global variables?

    - by user297535
    When I checked my application for memory leaks it is showing 12 leaks. What will be the effect of this? I used global variables as shown below #import "file1.m" int num; #import "file2.m" extern int num; num = 10; Can this cause memory leaks? Anyone please help. I am a beginner in programming.

    Read the article

  • assigning to local variables in scala template in play framework

    - by user3548344
    I am trying to define the local variables and assign to them as below : @defining((Json.parse(value), ("GGGGGG"))) {case (json:JsValue, lb)=> @{lb=json\\"myTestField"} } but getting the error reassignment to val. So I tried to declare lb as var like @defining((Json.parse(value), ("GGGGGG"))) {case (json:JsValue, lb:var)=> @{lb=json\\"myTestField"} } but getting the error identifier expected but 'var' found How can I assign to variable lb?

    Read the article

  • IRB and large variables?

    - by tesmar
    How can I print a large variable nicely in an irb prompt? I have a variable that contains many variables which are long and the printout becomes a mess to wade through. What if I just want the variable names without their values? Or, can I print each one on a separate line, tabbed-in depending on depth?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >