My php script performs a insert query ,
Then i want it to go to another html page.
header('Location : <url>') not working.
I an working on wamp server.
6 2347 RonB 589
Expert Mod 512MB
The problem is lines 24 thru 30. Delete them and all will be well. ;)
If you want serious answers, you'll need to post your code and explain what you mean by "not working". Do you receive any error message? Does it redirect to the somewhere else? Does it cause your computer to catch on fire?
My code: - <?php
-
$con = new mysqli("localhost:3306","root","","parking");
-
if($con->connect_error){
-
die("connectionn failed".$con->connect_error);
-
}
-
$url='localhost/4 user hame page.html';
-
$nam=$_REQUEST["name"];
-
$ag=$_REQUEST["age"];
-
-
$pho=$_REQUEST["phonenumber"];
-
$mai=$_REQUEST["mailid"];
-
$uname=$_REQUEST["Username"];
-
$pwd=$_REQUEST["password"];
-
-
-
$con->query("INSERT INTO `user` (`name`, `age`, `gender`, `phone`, `mailid`, `uname`, `pwd`) VALUES ('$nam', '$ag', 'f', '$pho', '$mai', '$uname', '$pwd')");
-
-
-
header("Loaction: localhost/4 user home page.html/");
-
-
?>
-
not working in the sense nothing happens, i.e no redirection or error.
RonB 589
Expert Mod 512MB
Do you have error reporting enabled?
Do you get a blank page, or something else?
Are you using the full URL in the redirect, or a relative path? If it's a relative path, you should change it to the full URL.
blank page only.
it's the full url
Please use code tags when posting code or formatted data.
Does it insert the data?
Your problem is line 19. You spelled Location wrong.
Also, your other problem is line 19. Unless the client is viewing this page from the same computer that the web server is on, the client computer can't resolve the localhost reference.
Thanks got it , after the spelling correction .
Sign in to post your reply or Sign up for a free account.
Similar topics
by: vishal |
last post by:
i am creating a news site. i am adding new news in database and it must
be visible to user at top. and then second latest news and so on.
i am displaying 15 news on each page and then put a link...
|
by: James Hong |
last post by:
Help please, I try to sending an email from my html page using the java
applet.
but it give error on most of the PC only very few work, what is the error i
make
the java applet show as below
...
|
by: Jon Haakon |
last post by:
Hi,
I'm developing a websolution using ASP and DHTML technology that's
running on a MS IIS webserver.
My solution is frame based with a toolbar on top, a hidden frame for
scripts in the...
|
by: Warren |
last post by:
Hello all.
I apologize if this has been asked a thousand times, but I must be pretty
thick because I have searching through google for the last day, and still
haven't any found concrete...
|
by: Warren |
last post by:
Lets try this again...
Why does this query work when executed from the MySql Control Center, but
when executed from ASP it adds white spaces to the html tags?
Here's the query:
INSERT INTO...
|
by: Daves |
last post by:
(using 2.0) I have a page for viewing products and each product is assigned
to several categories.
On this page I have a FormView and an AccessDataSource. The ItemTemplate
shows the product...
|
by: sconeek |
last post by:
hi all,
i am working on a web based java application. now i have this HTML page
which gets refreshed every 2 seconds (using javascript). now i also
want to redirect the user from this page to...
|
by: star111792 |
last post by:
hi,
i have just started learning ASP. i m doing database connectivity in ASP. my problem is with the insert query.
i have a page "form.asp" for taking input from user. after entering data...
|
by: rotaryfreak |
last post by:
hello,
im trying to build an application that will incorporate a "forgot password" feature. in order for my feature to work correctly, i am asking the user to type in his/her email address and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |