How to write the same page transfer value in php? What is the result I want? & lt; table & gt; & nbsp; & lt ;? Php $ I = 1; & nbsp; do {? & Gt; & lt; tr & gt; // Title & lt; td & gt; & lt; ahref = & quot; default_task_edi php?
What I want is
Do {?>
// Title
| "> |
} While ($ row_Recordset_task = mysql_fetch_assoc ($ Recordset_task ));?>
// The content related to the title is displayed here. The value of the content in and database is $ row_Recordset_task ['CSA _ text']
------ Solution --------------------
If you don't want to refresh the page, you can use ajax or the stupid method to create a new page with the same style as the original page to jump to this new page. the new page is visually similar to the original interface, as if it was not refreshed.
------ Solution --------------------
Agree to use ajax upstairs !!!
------ Solution --------------------
PHP code
Error :". mysql_error (); if (mysql_affected_rows ()> 0) {$ titles = array (); while ($ rows = mysql_fetch_array (MYSQL_ASSOC) {array_push ($ titles, $ rows) ;}}?>
Script // Ajaxvar xmlHttp; function createXMLHttpRequest () {if (window. XMLHttpRequest) {xmlHttp = new XMLHttpRequest ();} else if (window. activeXObject) {xmlHttp = new ActiveXObject ("Microsoft. XMLHTTP ") ;}} function record (id) {createXMLHttpRequest (); url =" action. php? Id = "+ id +" & ran = "+ Math. random (); method = "GET"; xmlHttp. open (method, url, true); xmlHttp. onreadystatechange = showList; xmlHttp. send (null);} function show () {if (xmlHttp. readyState = 4) {if (xmlHttp. status = 200) {var text = xmlHttp. responseText; document. getElementById ("show "). innerHTML = text;} else {alert ("response error code:" + xmlHttp. status) ;}} script
Error: ". mysql_error (); if (mysql_affected_rows ()> 0) {$ rows = mysql_fetch_array (MYSQL_ASSOC);} print_r ($ rows); mysql_close ();}?>
------ Solution --------------------
Learned
Discussion
PHP code
/* Created on [2012-5-16] Author [yushuai. niu] */
# Querying title information
$ SQL = "select * from table ";
$ Res = mysql_query ($ SQL );
If (! $ Res) die ("SQL: {$ SQL}
Error: ". mysql_error ());
If (mys ......