Php has a page to pass values to B page B to accept and store data to database problem a page has 1, 2, 3, 4, 5 buttons, each button has a corresponding link, click each button to send a value to page B, and upload the id, name, url, and so on. page B is responsible for adding records to the database. The record content is the id name url, now the problem is to add the corresponding type to the database, but the url cannot be added to the database, and B. php page jump is always the first button link address. Please help solve it
Code
A. php
$ Path = $ _ GET [path];
$ Url = "http://bj. TV .wo.com.cn ";
$ Result = mysql_query ("select * from new where path = '3' order by id desc limit 0, 1 ");
While ($ row = mysql_fetch_array ($ result )){
?>
& Name = & Url = ">
}
?>
B. php
Include ("conn. php ");
$ Id = $ _ GET [id];
$ Type = $ _ GET [type];
$ Showtime = date ("Y-m-d ");
$ Url = $ _ GET [url];
$ Resultc = mysql_query ("insert into total_counter (time, type, url) values ('$ Showtime',' $ type', '$ URL ')");
$ Result = mysql_query ("select * from new where id = $ id ");
While ($ row = mysql_fetch_array ($ result )){
?>
Script
Location = "url of the corresponding button link (the url of the button chain to the button )";
Script
}
?>
Reply to discussion (solution)
Is your source code like this ??? I didn't see the changed url.
The url carries a diagonal line and needs to be escaped before being inserted into the database.
The problem has been solved.
If the problem is solved, paste it to the score. you should have a small problem.