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 2344 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: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |