Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~970 People Reached
Favorite Forums
Favorite Tags
php x 5
Member Avatar for baheer

I have the following Code: I also tried also to use foreach Loop but it doesn't work. Any one can help me please: [CODE] ############### Code <?php include("config.php"); $sql="SELECT * FROM news"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <table width="400" border="0" cellspacing="1" cellpadding="0"> <tr> <td><form name="form1" method="post" action=""> <table width="400" border="0" cellpadding="3" cellspacing="1" …

Member Avatar for menelik
0
834
Member Avatar for baheer

<?php mysql_connect("localhost","username","password") or die ("Cannot connect" . mysql_error()); $dbname=$_GET['database']; $tablname=$_GET['tabname']; ?> <div id="stylized" class="myform"> <?php echo "<span class='db'>Table:" . $tablname . "</span>"; ?> <?php mysql_select_db($dbname); $q=mysql_query("SELECT * FROM $tablname"); if(!$q){ die("Query Failed!"); } $fields_num=mysql_num_fields($q); echo "<table><tr>"; for($j=0;j<$fields_num;$j++){ $fields=mysql_fetch_field($q); echo "<th>{$field->name}</th>"; } echo "</tr>\n"; while($row=mysql_fetch_array($q)){ echo "<tr>"; foreach($row as $cell){ echo …

Member Avatar for tanha
0
136