Posted on 2002-04-13
Medium Priority
Last Modified: 2006-11-17
i need the syntax for the location statement! i am not sure if this is a php or js :S
Question by:almaha
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
LVL 32

Accepted Solution

Batalf earned 40 total points
ID: 6939080
Do you mean Javascripts "location" object?
Set a new location of current page:



Expert Comment

ID: 6939772
maybe you need:
header("Location: http://www.mydomain.com/mypage.php");


Expert Comment

ID: 6944013
 header("Location: http://whatever");


But just make sure of the syntax. Only double quotes, and another thing "DO NOT" send any output request before the header call. That's an error.

For eg.


 print "I just messed up the program.";
 header("Location: http://whatever");


This one's gonna create an error. Just remove the print and its fine.

Hope this'll solve your problem if its for PHP.

Author Comment

ID: 6946612
noo :( you didn't get what i really need.
i don't want a header!
okay, i have a cancel button that i want it to link to another php file. but i don't wana do it as a usual html form!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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…
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

765 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