PHP - Moved: Quick Help Needed On Buttons:
This topic has been moved to CSS Help.
http://www.phpfreaks.com/forums/index.php?topic=320868.0 Similar TutorialsThis topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=345426.0 This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=327935.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318425.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=356626.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=321767.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=316188.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=355529.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=350599.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=321165.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=331158.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=357414.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=316681.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=319419.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=318486.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=333523.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318572.0 i need some quick help, this project has been way over due and ive wasted huge amounts of time researching on my own and bothering others trying to figure this out and i just cant leave it be its like a damn drug. im desperate folks! my 2 tables, movies: id - title - category - url categories: id - category (FK) what im trying to do is have every category list as a table and then list the movies owned by that category in them, example: Category 1 --------------- title title Category 2 -------------- title title Category 3 -------------- title title the code im using is Code: [Select] <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $result = mysql_query("SELECT a.ID, a.Title, b.Category, a.URL FROM Movies AS a JOIN Categories b ON a.Category = b.ID ORDER BY b.Category"); echo "<table border='1'> <tr> <th>Title</th> <th>Category</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td width='100'><a href='".$row['URL']."'>" . $row['Title'] . "</a></td>"; echo "<td width='150'>" . $row['Category'] . "</td>"; } echo "</table>"; $result2 = mysql_query("SELECT ID,Category FROM Categories"); while($row2 = mysql_fetch_array($result2)) { echo "<tr>"; echo "<td>" . $row2['Title'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> but obviously this code gives me a single table that lists all the titles with category next to them and then under the table it lists my categorys from left to right and its looks like Title Category --------------------- title1 Drama title2 Comedy title3 Horror title4 Thriller -------------------- DramaComedyHorrorThriller what exactly do i need to change to display the results i want ? btw dont hammer me on using 2 while loops, some tell me i need 2 and others say 2 is pointless. i myself have no clue! I've made my first object that will addition an array but it doens't seem to be working as it echo's out 0. here is my script <?php class A { public $sum = 0; function addition($values){ foreach ($values as $numbers){ $this->sum = $number + $this->sum; } echo $this->sum; } } $a = new A(); $array = array(10, 15, 25); echo $a->addition($array); ?> I don't see what I'm doing wrong. Any direction would be greatly appreciated. what does Code: [Select] WHERE p.pid IN(0,4561,0) mean? I know it's lokoing for DATA FROM p.pid = 4561, but WHAT THE HELL DOES THE 0, ,0 mean? Thanks Hi! I want to be able to create a dynamic tournament bracket but not sure where to get started, right now all the template brackets have been hardcoded, i.e. http://teamx1.com/templates/64.html Can you someone put me in the right direction by using PHP to create and write this file? I want to be able to create 64 + brackets but hardcoding is a huge headache and mistakes easily done. Thanks all. |