Search found 5 matches

by hmartyb
Thu Jul 28, 2005 1:05 pm
Forum: PHP - Code
Topic: Setting session variable using text box onChange event.
Replies: 8
Views: 2900

This poses the same risks as leaving register globals on, what happens when someone sets $name to 'admin' and $value to 1? Yeah, I was so intent on solving my coding, it didn't occur to me! Thanks for pointing it out! Also thanks for steering me in the right direction on setting my session variable...
by hmartyb
Thu Jul 28, 2005 11:10 am
Forum: PHP - Code
Topic: Setting session variable using text box onChange event.
Replies: 8
Views: 2900

I was afraid of that. I was trying to get around having to do this: <?php session_start(); $name = stripslashes($_GET['name']); $value = stripslashes($_GET['value']); switch ($name) { case "FirstName": $_SESSION['FirstName'] = $value; break; case "LastName": $_SESSION['LastName']...
by hmartyb
Wed Jul 27, 2005 7:00 pm
Forum: PHP - Code
Topic: Setting session variable using text box onChange event.
Replies: 8
Views: 2900

I'll play with it a bit more tomorrow. $_SESSION['SomeName'] may or may not have a value, as I'm tying this bit of code to my header request. I'll post the a better picture of what I'm trying to accomplish tomorrow, thanks for your help so far!!

Marty
by hmartyb
Wed Jul 27, 2005 6:37 pm
Forum: PHP - Code
Topic: Setting session variable using text box onChange event.
Replies: 8
Views: 2900

Okay, got that far, but it poses another problem. Now I need to dynamically name a session variable. I'm fairly new to sessions, so please bear with me. I tried something like this (which doesn't work): <?php session_start(); $SessionName = "SomeName"; $_SESSION[$SessionName] = "SomeV...
by hmartyb
Wed Jul 27, 2005 4:27 pm
Forum: PHP - Code
Topic: Setting session variable using text box onChange event.
Replies: 8
Views: 2900

Setting session variable using text box onChange event.

I need to set a session variable on the fly. I was using cookies, but I need way too many (much more than the 20 allowed): <script language="JavaScript"> function setCookie (name, value) { document.cookie = name + '=' + escape(value) } </script> <input type="text" name="Midd...