PHP - Courier-deprixa-pro-v3.2.6.2-integrated-web-system Issues
I get this response when I try to install Download Courier Deprixa Pro v3.2.6.2 – Integrated Web System on my website; Warning: Cannot modify header information - headers already sent by (output started at /home/speedora/public_html/Tracking/setup/index.php:68) in /home/speedora/public_html/Tracking/setup/index.php on line 71. Please I really need help with this Similar TutorialsHello, I have the following code Code: [Select] class Uploads extends Controller { public function __construct() { parent::__construct(); if (empty($_FILES)) { log_message('error', 'Uploads - files empty'); exit('No files uploaded'); } ini_set('memory_limit', '128M'); $this->load->helper('file'); $this->load->helper('helpers'); $this->load->model('uploads_model'); } public function font_handler() { $this->uploads_model->font_handler(); } } class Uploads_model extends Model { public function font_handler() { $config = array( 'max_size' => '8388', 'allowed_types' => 'ttf', 'upload_path' => 'assets/fonts/' ); $this->load->library('upload', $config); if ($this->upload->do_upload('Filedata')) { $file = $this->upload->data(); $jsFile = $file['raw_name'].'.js'; $query = $this->db->where('location', 'menuFont')->get('fonts')->row(); if ($query->customFile != '' && file_exists('assets/fonts/'.$query->customFile)) { unlink('assets/fonts/'.$query->customFile); } $path = getcwd() . '/assets/fonts/cufon/convert.php'; $command = 'php ' . $path . ' -u "U+??" ' . $file['full_path'] . ' 1> ' . getcwd() . '/assets/fonts/' . $jsFile; system($command); } } } Ok so, the ttf file is uploaded correctly and I can run $command from the command promt in putty and it works perfect, but when I try to run the same command from system() the js file just contains (from the controller) "No files uploaded" I have no idea why this is happening? Anyone have any ideas? Also one thing i'm not sure about is if it should be 1> or > when creating the js file?!? Thanks guys! Hi again PhpFreakz, yet again I have some issues with my PHP part of my website. Hi
I am working as a PHP developer in my organization. They asked me to integrate several couriers in of our client's website. As i have only 1 year of experience and i am new to this.
Can any one help me by sending me the courier integration scripts in PHP for
1. Blue Dart
2. Delhivery
3. FEDEX
4. ARAMEX
5. GATI
Kindly help me.
I need like, http://www.trackcourier.in/ The customer chooses selected courier service and enters tracking id then clicks its redirect to the appropriate courier service website. eg: If tracking id 12345 the redirect link should be https://www.fedex.com/apps/fedextrack/index.html?tracknumbers=12345&cntry_code=in How to do for India courier services? This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=315539.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=315590.0 hello dear PHP-Fans - greetings to you - and a happy new year!! i set up a WAMP-System on my openSuse 11.4 system. In order to learn as much as i can bout PHP i want to do some tests and write some scripts. Well the WAMP is allready up and running. Now i try to give the writing access to the folder mkdir /srv/www/ where the php-scripts should go in... i want to give write permission to all to all files in /srv/www As root I generally: mkdir /srv/www/ chown <webmaster usrername> /srv/www/ /srv/www/ should be readable and traversable by all, but only writeable by it's owner (the user designated as the webmaster.) can i do this like mentioned above,... Love to hear from you greetings db1
Hi this is my login script i do have the html if you need to see it please ask & i was wondering if anyone would be kind enough to tell me how i can get my ban system to work Thanks
<?php require 'connect.php'; if(isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['password']; //Prevent hackers from using SQL Injection $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql = "SELECT * FROM $tbl_name WHERE username='$username' AND password='$password'"; $result = mysql_query($sql); $count = mysql_num_rows($result); $user_level = $_GET['user_level']; $_SESSION['user_level'] = $user_level; if($count == 1) { $_SESSION['username']; $_SESSION['password']; header("Location: index.php"); } else { echo "Please check the username and password you entered is correct."; } if($_SESSION['user_level'] == 0) { $_SESSION['username']; $_SESSION['password']; header("Location: index.php"); } else if($_SESSION['user_level'] == -1) { die(); header("Location: banned.php"); } else if($_SESSION['user_level'] < -1) { die(); echo "An error has occurred please contact your administrator."; } else if($_SESSION['user_level'] == 1) { $_SESSION['username']; $_SESSION['password']; header("Location: admin.php"); } } ?> Edited by Tom8001, 23 November 2014 - 12:18 PM. Hi all I have been looking though loads of tutorials regarding log in method for websites (not APIs), and cant help find that they are outdated. So I am asking what is the correct way to create a log in system using php? Modern websites use JavaScript for asynchronous web requests so this requirement should also be catered for. APIs and mobile apps use access tokens which is very secure if implemented correctly. Can we use the token principle for websites? As the way I see it that most php log in systems use php sessions and they create a session and save some data in this session when the user successfully authenticates, however the session id is held in a cookie so if the cookie is stolen then they have access to your account. API access tokens are expired and refreshed periodically so is there such a implementation method for web sites too? i am trying to add a like system to my forum similar to facebook where it shows how many people like a post. this is my code so far: $like_list = ""; $likes = explode("|", $post_info['post_likes']); $amount_likes = count($likes); $ac_likes = ($amount_likes / 2); $slice = array_slice($likes, 0, 4, true); $remain = array_slice($likes, 4, $ac_likes, true); $remain_num = count($remain); if ($ac_likes >= 4) { for($i=0; $i<$ac_likes; $i+=2) { $like_list .= $likes[$i].", "; } $like_list .= " and $remain_num others like this"; } elseif ($amount_likes == 1 ) { $like_list .= "0 people like this"; } elseif ($ac_likes == 1) { $like_list = implode(", ", $likes); $like_list .= " likes this"; } else { $like_list = implode(", ", $likes); $like_list .= " like this"; } $post_info['post_likes'] contains data like: Code: [Select] user1|123456789|user2|123456789 where the number is the timestamp. unfortunatly $like_list prints the username and the timestamp when i would like it to only display the username. This means printing every 2nd element in the array starting from 0. I have seen this done with for loops but i am not using one therefore i am stuck. Any ideas? and is this the best database setup for likes? the post_likes column is added on to the end of the post table. I already have a web based RPG game I am developing. Here is a small video to showcase the loot animation.
My problem is, I want to add combat. I will be using html 5 websockets. I already have a websockets server up so multiplayer isn't the issue.
A good combat system I found is on this game:
http://treasurearena.clay.io/
I'm not going to dig out the source code, and try to extract the combat system from this game. Just trying to find something similar that I can use, does anyone have any recommendations?
Thanks!
Edit: It can be as simple as swinging a freaking sword and moving. That's all I really want, I just don't want the boring 'click', 'click', and 'click' bullshit.
Hi, i have been thinking on ways to make an ordering system for my web site. The code bellow shows how i populate the page. i desplay the pizza's from the data base. i want at the end of each line a box thati allows the user to pick howmany pizzas they want. from they when they click order i want it to send all the information of what they want so they can double check it and when they click the final order button it will send to a diffrent order table. Code: [Select] <? session_start(); if ($_SESSION['userName']) {} else { header('location:../index.php'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Deliver-Pizza Topping</title> <link href="css/pizza-topping.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"> <img src="images/logo.jpg" alt="logo" /> <a href="log-off.php" id="logg-off" >log off</a> <ul id="nav"> <li><a href="home.php" target="_self">Home</a></li> <span> | </span> <li><a href="Pizza-Topping.php" target="_self">Pizza Topping</a></li> <span> | </span> <li><a href="order.php" target="_self">Order</a></li> <span> | </span> <li><a href="Account.php" target="_self">Account Details</a></li> <span> | </span> </ul> </div> <div id="Featured"> <img src="images/banner1.jpg" alt="banner" name="banner"" ID="banner"></div><!--end Featured--> <div class="featuredimage" id="main"> <div id="content" class="tiles"> <h1>Pizza-Topping</h1><hr /> <p>Please select the pizza you would like bellow</p> <div id ="staff"><div style="width:970px; height:300px; overflow:auto" <left> <table> <tr> <th>Type</th> <th>Size</th> <th>Topping</th> <th>Cost</th> <th>Information</th> <th>Order</th> </tr> <tr> <form name="input" action="order.php" method="post"> <?php mysql_connect("localhost", "root", "")or die("cannot connect"); mysql_select_db("deliverpizza")or die("cannot select DB"); $sql="SELECT * FROM `pizzatopping` "; $result= mysql_query($sql); while($row =mysql_fetch_assoc($result)) { ?> <td><?php echo $row['type'] ?></td> <td><?php echo $row['size'] ?></td> <td><?php echo $row['topping'] ?></td> <td><?php echo $row['cost'] ?></td> <td><?php echo $row['info'] ?></td> <td> <input type:"text" name:"pizza<?php echo $row['id'] ?>" /></td> </tr></left> <?php } ?> <input type="submit" value="Order" /> </table> </div> </div> </div> </div> <!--end content--> <div id="footer"><span><p>Created By Ryan Williams</p></span></div><!--end footer--> </div><!--end container--> </body> </html> Help please Hello There I've created an Voucher In MySQL/Database system. I would like to know how would I go about programming it into my shopping cart so when a client has an secret Voucher / Coupon they can have a percentage off of the total price of the items their trying to purchase then place thats final price into paypal checkout. shopping cart and database of the Voucher shown below thanks in advance. <?php require "connect_query.php"; $voucher = "CREATE TABLE `voucher_code` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `vouchercode` VARCHAR( 16 ) NOT NULL , `active` TINYINT( 1 ) NOT NULL , `min_basket_cost` FLOAT NOT NULL , `voucher_operation` ENUM( '-', '%', 's' ) NOT NULL , `voucher_amount` FLOAT NOT NULL , `num_vouchers` INT( 11 ) NOT NULL DEFAULT '-1', `expiry` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY ( `ID` )"; if (mysqli_query($db_conx,$voucher)){ echo "Vouchar Table has been CREATED :)"; }else{ echo "Vouchar TABLE was not a success :("; } ?> ////////////////////////////////////// Cart.php <?php // Start session first thing in script session_start(); // Script Error Reporting error_reporting(E_ALL); ini_set('display_errors', '1'); // Connect to the MySQL database include "connect_prompt/connect_query.php"; ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 1 (if user attempts to add something to the cart from the product page) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (isset($_POST['pid'])) { $pid = $_POST['pid']; $size = $_POST['size']; $wasFound = false; $i = 0; // If the cart session variable is not set or cart array is empty if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) { // RUN IF THE CART IS EMPTY OR NOT SET $_SESSION["cart_array"] = array(1 => array("item_id" => $pid, "size" => $size, "quantity" => 1)); } else { // RUN IF THE CART HAS AT LEAST ONE ITEM IN IT foreach ($_SESSION["cart_array"] as $each_item) { $i++; while (list($key, $value) = each($each_item)) { if ($key == "item_id" && $value == $pid){ if ($each_item['size'] == $size){ // That item is in cart already so let's adjust its quantity using array_splice() array_splice($_SESSION["cart_array"], $i-1, 1, array(array("item_id" => $pid, "size" => $size, "quantity" => $each_item['quantity'] + 1))); $wasFound = true; }} // close if condition } // close while loop } // close foreach loop if ($wasFound == false) { array_push($_SESSION["cart_array"], array("item_id" => $pid,"size" => $size, "quantity" => 1)); } } header("location: cart.php"); exit(); } ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 2 (if user chooses to empty their shopping cart) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (isset($_GET['cmd']) && $_GET['cmd'] == "emptycart") { unset($_SESSION["cart_array"]); } ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 3 (if user chooses to adjust item quantity) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (isset($_POST['item_to_adjust']) && $_POST['item_to_adjust'] != "") { // execute some code $item_to_adjust = $_POST['item_to_adjust']; $size = $_POST['size']; $quantity = $_POST['quantity']; $quantity = preg_replace('#[^0-9]#i', '', $quantity); // filter everything but numbers if ($quantity >= 100) { $quantity = 99; } if ($quantity < 1) { $quantity = 1; } if ($quantity == "") { $quantity = 1; } $i = 0; foreach ($_SESSION["cart_array"] as $each_item) { $i++; while (list($key, $value) = each($each_item)) { if ($key == "item_id" && $value == $item_to_adjust) { if ($each_item['size'] == $size ){ // That item is in cart already so let's adjust its quantity using array_splice() array_splice($_SESSION["cart_array"], $i-1, 1, array(array("item_id" => $item_to_adjust, "quantity" => $quantity, "size" => $size))); } // close if condition } // close while loop } // close foreach loop } } ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 4 (if user wants to remove an item from cart) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (isset($_POST['index_to_remove']) && $_POST['index_to_remove'] != "") { // Access the array and run code to remove that array index $key_to_remove = $_POST['index_to_remove']; if (count($_SESSION["cart_array"]) <= 1) { unset($_SESSION["cart_array"]); } else { unset($_SESSION["cart_array"]["$key_to_remove"]); sort($_SESSION["cart_array"]); } } ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 5 (render the cart for the user to view on the page) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $cartOutput = ""; $cartTotal = ""; $pp_checkout_btn = ''; $product_id_array = ''; if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) { $cartOutput = "<h2 align='center'>Your shopping cart is empty</h2>"; } else { // Start PayPal Checkout Button $pp_checkout_btn .= '<form action="[url=https://www.paypal.com/cgi-bin/webscr]https://www.paypal.com/cgi-bin/webscr[/url]" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="myemail@gmail.com">'; // Start the For Each loop $i = 0; foreach ($_SESSION["cart_array"] as $each_item) { $item_id = $each_item['item_id']; $sql = "SELECT * FROM products WHERE id='$item_id' LIMIT 1"; $query = mysqli_query ($db_conx,$sql); while ($row = mysqli_fetch_array($query)){ $product_name = $row["product_name"]; $price = $row["price"]; $details = $row["details"]; $taxes = $row["taxes"]; $shipping_one =$row['shipping_one']; } $pricetotal = $price * $each_item['quantity']; $cartTotal = $pricetotal + $shipping_one + $taxes + $cartTotal; setlocale(LC_MONETARY, "en_US"); //$pricetotal = money_format("%10.2n", $pricetotal); // Dynamic Checkout Btn Assembly $x = $i + 1; $pp_checkout_btn .= ' <input type="hidden" name="item_name_' . $x . '" value="' . $product_name . '"> <input type="hidden" name="amount_' . $x . '" value="' . $price . '"> <input type="hidden" name="quantity_' . $x . '" value="' . $each_item['quantity'] . '"> <input type="hidden" name="handling_'. $x . '"value="'. $shipping_one .'"> <input type="hidden" name="tax_'. $x . '"value="'. $taxes .'"> <input type="hidden" name="on0_' . $x . '" value="' . $each_item['size'] . '">'; // Create the product array variable $product_id_array .= "$item_id-".$each_item['quantity'].","; // Dynamic table row assembly $cartOutput .= "<tr>"; $cartOutput .='<td><a href="product.php?id=' . $item_id . '">' . $product_name . '</a><br /><img src="inventory_images/' . $item_id . '.jpg" alt="' . $product_name. '" width="40" height="52" border="1" /></td>'; $cartOutput .= '<td>' . $each_item['size'] .'</td>'; $cartOutput .= '<td>' . $details . '</td>'; $cartOutput .= '<td>$' . $price . '</td>'; $cartOutput .= '<td><form action="cart.php" method="post"> <input name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1" maxlength="2" /> <input name="adjustBtn' . $item_id . '" type="submit" value="change" /> <input name="item_to_adjust" type="hidden" value="' . $item_id . '" /> </form></td>'; //$cartOutput .= '<td>' . $each_item['quantity'] . '</td>'; $cartOutput .= '<td>' . $pricetotal . '</td>'; $cartOutput .= '<td><form action="cart.php" method="post"><input name="deleteBtn' . $item_id . '" type="submit" value="X" /><input name="index_to_remove" type="hidden" value="' . $i . '" /></form></td>'; $cartOutput .= '</tr>'; $i++; } setlocale(LC_MONETARY, "en_US"); // $cartTotal = money_format("%10.2n", $cartTotal); $cartTotal = "<div style='font-size:18px; margin-top:12px;' align='right'>Cart Total : ".$cartTotal." USD</div>"; // Finish the Paypal Checkout Btn $pp_checkout_btn .= '<input type="hidden" name="custom" value="' . $product_id_array . '"> <input type="hidden" name="notify_url" value="[url=https://www.shopstorms.com/storescripts/my_ipn.php]https://www.shopstorms.com/storescripts/my_ipn.php">[/url] <input type="hidden" name="return" value="[url=https://www.mywebsite.com/checkout_complete.php]https://www.mywebsite.com/checkout_complete.php">[/url] <input type="hidden" name="rm" value="2"> <input type="hidden" name="cbt" value="Return to The Store"> <input type="hidden" name="cancel_return" value="[url=https://www.mywebsite.com/paypal_cancel.php]https://www.mywebsite.com/paypal_cancel.php">[/url] <input type="hidden" name="lc" value="US"> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="[url=http://www.paypal.com/en_US/i/btn/x-click-but01.gif]http://www.paypal.com/en_US/i/btn/x-click-but01.gif[/url]" name="submit" alt="Make payments with PayPal - its fast, free and secure!"> </form>'; } ?> <?php if(!empty($pricetotal)) { ?> <?php $discount =""; if($pricetotal >= 50){ echo "FREE SHIPPING!"; } elseif ($pricetotal <= 50){ echo "SPEND MORE THAN 50 GET FREE SHIPPING!"; } ?> <?php } ?> <body> <div align="center" id="mainWrapper"> <div id="pageContent"> <div style="margin:24px; text-align:left;"> <br /> <table width="1024" border="1" cellspacing="0" cellpadding="6" align="center" style="background-color:white;"> <tr> <td width="18%" bgcolor="#C5DFFA"><strong>Product</strong></td> <td align="center" width="10%" bgcolor="#C5DFFA"><strong>Size</strong></td> <td width="45%" bgcolor="#C5DFFA"><strong>Product Description</strong></td> <td width="10%" bgcolor="#C5DFFA"><strong>Unit Price</strong></td> <td width="9%" bgcolor="#C5DFFA"><strong>Quantity</strong></td> <td width="9%" bgcolor="#C5DFFA"><strong>Total</strong></td> <td width="9%" bgcolor="#C5DFFA"><strong>Remove</strong></td> </tr> <?php echo $cartOutput; ?> <!-- <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> --> </table> <table width="1024" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <th scope="col" align="left"><a href ="cart.php?cmd=emptycart">Click Here to Empty Your Shopping Cart</a></th> <th scope="col" align="center" style="color:black;"> <?php if(!empty ($taxes)) { ?> <?php echo $taxes; ?> <?php } ?> <br/> <?php if(!empty ($shipping_one)) { ?> <?php echo $shipping_one; ?> <?php } ?> <br/> <?php if(!empty ($cartTotal)) { ?> <?php echo $cartTotal; ?> <?php } ?> <br/><?php if(!empty ($discount)) { ?> <?php echo $discount; ?> <?php } ?> <br/> </th> </tr> </table> <table width="1024" height="50" border="0" cellspacing="10" cellpadding="0" align="center"> <tr> <th width="913" align="left" scope="col"></th> <th width="105" align="right" scope="col"><?php echo $pp_checkout_btn; ?> </th> </tr> </table> <br /> <br /> <br /> <br /> </div> <br /> </div> </div> </body> </html> Edited by requinix, 30 June 2014 - 09:15 PM. please use [code] tags when posting code Hi Everyone, Just a quick question before I take on this project. Basically the client has a secure server set up with folders for different clients. So they can store excel files, PDFs etc, What the client use to do was send the client an email with the http address of that clients particular folder to be able to login. What my job is to create a login system that redirects each client to their particular area on the secure system. Is this going to be difficult, What I was thinking of doing was when the administator is setting up the client details there would be an extra field saying address: they paste the address of the folder on the server. Then it will redirect them to their folder. Is this the correct way to do this. Any help or advice would be great. Hi, im getting alot of errors like so Deprecated: Function session_is_registered() is deprecated time to update some files, can you guys pls help im rubbish with PHP guess thats why I waited so long to update. here is the code I need to change checklogin.php // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:index.php"); } index.php <? session_start(); /*if(!session_is_registered(myusername)){ header("location:main_login.php"); }*/ ?> index.php (display username stuff) <?php if(session_is_registered(myusername)){ ?> Welcome: <?= $_SESSION['myusername'] ?><?php } ?> index.php (edit content stuff) <?php $file = file_get_contents('content/menu_header_a.txt', 'r'); if(session_is_registered(myusername)){ ?><a href="javascript:open4()"><?php echo $file ?></a><?php } else { echo $file; }?> Many thanks for any and all your help with this one. if you could keep it simple please like ( replace this with this ) . thanks Looking for the best way to set-up the db of a messaging system. Here's what I have so far (basically pulled from another forum), don't know if Table1 is even really necessary: Table1: id user_message_id recepient_id recepient_read Table2: user_message_id sender_id sender_read subject message created_at updated_at Basically it needs to function where, someone submits a message to the admin or moderator, the admin/moderators can review and reply, and then the user can submit another reply, and keeps going indefinitely. I want each reply to show up almost like a forum thread. How would I chain the reply messages to the original messages? im working on a point system for my forum where points are awarded based on actions taken. $scores = array( 'login' => 1, 'editor' => 10 ); so if a user logs in then they will be awarded 1 point, if they edit their post then they get 10 points etc. So in my login process page i process the login then award the points that it is worth with $score['login']. Everything works fine. My problem is that this is a forum package like phpbb and mybb where people download the package and can install their own forum. So i want them to be able to add to the points list. For example the admin chooses to award 10 points for every post that is made. how would i go about implementing this? the points categories would be in the database but what happens in the post processing page when i add the post to the database? how would i know that the admin wants some points awarded? the database would look like so: id title points 1 post 10 but the title can change based on the admins choosing of words. I hope i explained this ok. So I am having some difficulties with a category system. I want my code to search the database an unlimited amount of times to the very last directory and then display it in tree view on my screen. I'm having some trouble because I am having to specify how many depths the code will search. How can I get it to do this on it's own? Currently my code does this... <?php // Establish SQL Connection. $mysqli = mysqli_connect( $sql['host'], $sql['user'], $sql['pass'], $sql['db'] ) or die( "DARN"); $query = $mysqli->query( "SELECT * FROM folders ORDER BY name ASC" ); $num_rows = $query->num_rows; echo "Found <b>" . $num_rows . "</b> row(s) in the database!<br>"; while ( $row = mysqli_fetch_array( $query ) ) { // DO NOT REMOVE $id = $row['id']; $name = $row['name']; $parent = $row['parent']; /***************************************************************************************************/ if ( $parent == 0 ) { echo $id . " " . $name . " " . $parent . "<br>"; $query2 = $mysqli->query( "SELECT * FROM folders WHERE parent = " . $id . " ORDER BY name ASC" ); while ( $row2 = mysqli_fetch_array( $query2 ) ) { echo " " . $row2['name'] . "<br>"; } } } ?>I know it's messy, doing the best I can. DB looks a little like this... +----+---------+--------+ |