Click here to Skip to main content
15,504,549 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
Questionwhy i cound't access apple's server with php curl Pin
wjun1976121918-Feb-11 6:10
wjun1976121918-Feb-11 6:10 
AnswerRe: why i cound't access apple's server with php curl Pin
Tom Chantler23-Feb-11 22:21
professionalTom Chantler23-Feb-11 22:21 
QuestionData normalization Pin
Mutugi from Nairobi14-Feb-11 21:14
Mutugi from Nairobi14-Feb-11 21:14 
AnswerRe: Data normalization Pin
Eddy Vluggen19-Feb-11 4:04
professionalEddy Vluggen19-Feb-11 4:04 
QuestionGetting google photo result by php Pin
ty-exexch-ko10-Feb-11 10:31
ty-exexch-ko10-Feb-11 10:31 
Questionmysql_query error Pin
komanche7-Feb-11 23:31
komanche7-Feb-11 23:31 
AnswerRe: mysql_query error Pin
Gerben Jongerius8-Feb-11 4:13
Gerben Jongerius8-Feb-11 4:13 
Questiondisplay query result in a table using PHP Pin
PermissionDenied6-Feb-11 21:10
PermissionDenied6-Feb-11 21:10 
here's my code... this is intended to display a query result in a table but i am getting unwanted characters and no table was displayed... what could be wrong with my codes? here it is... thanks in advance..

<html>
<body>
<?php

if (isset($_POST['btnSearch'])) {
//connection to the database
$connection = mysql_connect('localhost', 'root', '');

if (!$connection)
die(mysql_error());

//select database
if (!mysql_select_db('bbs', $connection))
die(mysql_error);
$SearchOpt = $_POST['SearchOption'];
if (empty($SearchOpt))
die("You did not select field.");
$SearchKey = $_POST['txtKey'];
if (empty($SearchKey))
die("You did not enter a keyword.");
$sqlQuery = mysql_query("SELECT * FROM t_board WHERE $SearchOpt LIKE '%$SearchKey%' ORDER BY registerTime DESC;");
if(!$sqlQuery)
die(mysql_error());
if (mysql_num_rows($sqlQuery)) {
echo "<tbody>";
$recs = mysql_fetch_array($sqlQuery) or die(mysql_error());
foreach($recs as $rec) {
echo "<tr>";
echo "<th>" . $rec['index'] . "</th>";
echo "<th>".$rec['subject']."</th>";
echo "<th>".$rec['writer']."</th>";
echo "<th>".$rec['registerTime']."</th>";
echo "</tr>";
}
echo "</tbody>";
}
}
?>
</body>
</html>
AnswerRe: display query result in a table using PHP Pin
Jules VDV9-Feb-11 5:56
Jules VDV9-Feb-11 5:56 
AnswerRe: display query result in a table using PHP Pin
Al4211-Feb-11 13:02
Al4211-Feb-11 13:02 
Questionmake tab&menu Pin
Elham M5-Feb-11 6:59
Elham M5-Feb-11 6:59 
AnswerRe: make tab&menu Pin
Eddy Vluggen19-Feb-11 4:05
professionalEddy Vluggen19-Feb-11 4:05 
QuestionProblem with PHP - FastCGI - Headers Pin
Lea Hayes4-Feb-11 14:51
Lea Hayes4-Feb-11 14:51 
AnswerRe: Problem with PHP - FastCGI - Headers Pin
Peter_in_27804-Feb-11 15:25
professionalPeter_in_27804-Feb-11 15:25 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Lea Hayes5-Feb-11 4:30
Lea Hayes5-Feb-11 4:30 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Peter_in_27806-Feb-11 14:40
professionalPeter_in_27806-Feb-11 14:40 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Lea Hayes7-Feb-11 1:26
Lea Hayes7-Feb-11 1:26 
AnswerRe: Problem with PHP - FastCGI - Headers Pin
Peter_in_27807-Feb-11 13:28
professionalPeter_in_27807-Feb-11 13:28 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Lea Hayes7-Feb-11 14:09
Lea Hayes7-Feb-11 14:09 
AnswerRe: Problem with PHP - FastCGI - Headers Pin
Peter_in_27807-Feb-11 15:00
professionalPeter_in_27807-Feb-11 15:00 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Lea Hayes8-Feb-11 1:11
Lea Hayes8-Feb-11 1:11 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
nickmaroulis8-Feb-11 10:36
nickmaroulis8-Feb-11 10:36 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
Lea Hayes8-Feb-11 16:14
Lea Hayes8-Feb-11 16:14 
GeneralRe: Problem with PHP - FastCGI - Headers Pin
nickmaroulis8-Feb-11 16:54
nickmaroulis8-Feb-11 16:54 
QuestionCreating file headers in php. Pin
Danzy8330-Jan-11 3:57
Danzy8330-Jan-11 3:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.