Jump to content

elflacodepr

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Everything posted by elflacodepr

  1. try this $con = mysql_connect($bd_host, $bd_usuario, $bd_password); mysql_select_db("mydatabase", $con); because for what i can see...i dont see anything else wrong
  2. add to your query this SELECT * FROM timetable WHERE staffid = '$staffid' ORDER BY day ASC
  3. try this: $get_colors = "SELECT item_color FROM store_item_color WHERE item_id = '$item_id' ORDER BY item_color"; if not, echo the query to see what it shows, example: echo $get_colors = "select item_color from store_item_color where item_id = $item_id order by item_color";
  4. Hello, the problem is, when i open the mysql client (the one looking like a CMD) it opens and closes quickly, I've been using phpMyAdmin all this time this is why i didn't noticed about the problem... I'm using XAMPP MySQL: 5.0.51 if anyone can help
  5. what you are showing doesnt say much, can u please post the code?
  6. after you finish editing select "save as" and write it like records.sql or what ever you want, it must have the .sql extension at the end. To open the file simply use notepad
  7. The problem is that, the word "desc" is a reserved word. so you should change "desc" field in your table to something else.
  8. Here: http://www.php.net/manual/en/book.bbcode.php
  9. you can use the JOIN or UNION statement.
  10. I can't see anywhere in your code that you connected to DB or include any file to do so. Here is: <?php //DB Config $user = 'user here'; $pass = 'password here'; $host = 'localhost'; $dbname = 'Data Base name here'; // Connect to DB $db = mysql_connect ($host, $user, $pass) or die ('Error: ' . mysql_error()); mysql_select_db ($dbname); //Select statement to be sent to MYSQL Database ordered by title $query = "SELECT * FROM `products` WHERE title = 'title1' ORDER BY item_num"; //Result set from the MYSQL Query $result = mysql_query($query) or die(mysql_error()); //Counter to keep track of how many displayed $count = 1; //Initiate the table to hold the items echo "<table><tr>"; //While Loop to fetch and display all the products in nested tables while($newArray = mysql_fetch_array($result, MYSQL_ASSOC)) { //All the columns of the table in the database $item_num = $newArray['item_num']; $units_per_case = $newArray['units_per_case']; $pieces_per_unit = $newArray['pieces_per_unit']; $weight = $newArray['weight']; $section = $newArray['section']; $title = $newArray['title']; $desc = $newArray['desc']; $image_id = $newArray['image_id']; //If there are less than 3 items in the table it adds the next item to it if($count <= 3) { //Prints out the rows and columns in the table echo " <td> <table width='210'> <tr> <td height='70'> "; $filename = "images/products/new/$image_id.png"; if (file_exists($filename)) { echo "<a class='popup' href='#'><img src='images/products/new/$image_id.png'><span><img src='images/products/big/$image_id.png'></span></a>"; } else { echo "<img src='images/products/new/holder.png'>"; } echo " </td> </tr> <tr> <td>item # $item_num</td> </tr> <tr> <td>$desc</td> </tr> </table> </td> "; $count++; } else if($count > 3) { //Closes the table and starts a new one when there are more than 3 items in the current table $count = 1; echo "</tr>"; echo "</table>"; echo "<br>"; echo "<table>"; echo "<tr>"; } } if($count = 1) { //Closes the empty table that is created when there are only 3 left echo "</tr>"; echo "</table>"; echo "<br>"; } ?>
  11. the "code" tags aren't there for styling, use them for better reading
  12. the SET stated is incomplete, you must provide what to set.. $sql = "UPDATE aiimjoin SET company = 'YOUR COMPANY' WHERE uid = "$_SESSION[uid]"";
  13. ## USER IP BANNING <Limit GET POST> order allow,deny deny from 193.110.145.185 allow from all </Limit> change "193.110.145.185" with the IPs you want to block, remember you can add more rows to ban mroe IPs
  14. hehe no worries, feel free to post any other problem!
  15. this is all i can help: http://www.php.net/manual/en/book.mysql.php
  16. well, i cant see that you are connecting to your DB, here it is: <?php $host="***"; // Host name $username="***"; // Mysql username $password="***"; // Mysql password $db_name="***"; // Database name // Connect to DB $db = mysql_connect ($host, $username, $password) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($db_name); // Step 1 $company = $_POST['company']; $address = $_POST['address']; $phone = $_POST['phone']; // Step 2 $sql = "insert into general (company, address, phone) VALUES ('$company', '$address', '$phone')"; // Step 3 $result = mysql_query($sql) or die ( mysql_error() ); ?>
  17. i think this is getting bit confusing, if you want to reset or change password why not make the user to type his old password then type a new one. so it will be like: "UPDATE members SET password = '$new_pass' WHERE password = '$old_pass'" after all you should make sure that you are changing the correct password from the correct user.
  18. try this: mysql_query("INSERT INTO order (fname, lname, uname, pass, mail, birth, plan, time) VALUES ('$_POST['fname']' , '$_POST['lname']' , '$_POST['uname']', '$_POST['pass']', '$_POST['mail']', '$_POST['birth']', '$_POST['plan']', '$_POST['time']"')");
  19. try this <td align="left" width="500px"> <?php include("/mine/blog/index.php"); ?> </td> if not use absolute link: <td align="left" width="500px"> <?php include("www.thrashbike.com/mine/blog/index.php"); ?> </td>
  20. 6 will be ok, and remember to use Caps and numbers
  21. if you are only running it local, sometimes is the your comp that is causing such problems, lets say few process running, etc. etc.. it happens to me sometimes :-\
  22. I took this from a website, in your .htaccess file you will write this: ## USER IP BANNING <Limit GET POST> order allow,deny deny from 42.12.5.34 deny from 212.173.53. deny from 69.242. allow from all </Limit> Heres how it works * 42.12.5.34 (Blocks a specific IP address) * 212.173.53. (Blocks ALL IPs within the range 212.173.53.xxx) * 69.242. (Blocks ALL IPs within the range 69.242.xxx.xxx) * 81.158.3 (Blocks ALL IPs within the range 81.158.3xx.xxx.xxx)
  23. you can use Javascript or AJAX of course if you mean to do it all without reloading the page like a real-time action.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.