The way the page gets information is consistent with the way I publish the polling page.
"."". $row [' VName ']. " Publisher: ". $username [0]."
Release date: ". $row [' StartTime ']." ".". $intro. "". "". "";} ? " >
1. Submit the SQL statement through the mysql_query () method and obtain the query result.
$sql = "Select Vid,vname,starttime,uid,vintro from Vote ORDER by vid DESC"; $voteItem =mysql_query ($sql);
2, through the cycle, the use of the Mysql_fetch_array () method, each time to obtain a record, and through the loop, get the information in one article. In the process of looping, the corresponding data is added to the string and displayed in this way to automatically display the records in the page function.
(Note: The difference between the Mysql_fetch_array () method and the Mysql_fetch_row () method.) The array method is more like the enhanced version of the row method, and the array method obtains the information for each record in an array, with the table header as the table below, to facilitate subsequent calls. The row method has no back-up functionality. )
3, because the limit of the page amplitude, can only show part of the voting profile, here only to intercept the first 100 words in the page display, and after adding "..."
$intro =substr ($row [' Vintro '],0,300). ......";
(The next Chinese character in the UTF8 format represents 3 characters, so it is set to 300 characters.) )
The above describes the simple online voting system php--home page to get information, including the content of the subject, I hope that the PHP tutorial interested in friends to help.