[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Multifile

Posted on 2006-10-21
1
Medium Priority
?
177 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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

649 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