Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i change the table selected using a text box? I dont even know if it its possible but i want to display different tables but be able to type a name and have it change.
PHP
<?php
include 'config.php';

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM questions";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

echo "<center>Database Output</center><br><br>";

$i=0;
while ($i < $num) {

$name=mysql_result($result,$i,"Kiya_text");
$name = preg_replace("/%u([0-9a-f]{3,4})/i","\\1;",urldecode($name));

echo "$name<br>$quote<br>$bio<br><hr><br>";

$i++;
}

?>


I want to change $query="SELECT * FROM questions"; using a textbox in html
is it even possible.

Thank you in advance.
Posted
Comments
Mohibur Rashid 23-Jul-15 3:46am    
yeah, it is possible. But answering here would be overwhelming.
faizanza 27-Jul-15 19:04pm    
well thank you anyways

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900