?
Solved

Multifile

Posted on 2006-10-21
1
Medium Priority
?
175 Views
Last Modified: 2010-05-18
Hi,

I would like to ask how to code in PHP

ex.

if ($_POST['statechange']!="")
{
session_start();
session_register("statechange");
setcookie("accstate", $statechange, time()+3600);  /* expire in 1 hour */
{ header("Location: default_.htm"); }
}

But i want the Location: default_.htm will be automatically changed to seletected state in the form posting

ex.

if I choose state "Virgina" then click GO then the Location: default_.htm -> Location: default_VA.htm
if I choose state "Florida" then click GO then the Location: default_.htm -> Location: default_FL.htm
and soon

Thanks


0
Comment
Question by:abangbatax
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 17779798
I assume the value of $_POST['statechange'] contains the value VA , FL ... etc ?
otherwise you need a lookup array to translate Florida into FL etc...

if (@$_POST['statechange']!="")
{
$state = $_POST['statechange'];
session_start();
session_register("statechange");
setcookie("accstate", $statechange, time()+3600);  /* expire in 1 hour */
{ header("Location: default_$state.htm"); }
}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question