Jump to content

eugene2009

Members
  • Posts

    109
  • Joined

  • Last visited

    Never

Everything posted by eugene2009

  1. thank you so much.. and another question.. say the previous page "customer_list.php" lists all the names of the customers. when you click on one of the names it will take them to customer_records.php well how exactly can I link all the names with the proper id's ? thank you for the help
  2. Hey so if i have a table with all the rows numbered with a customerid. Say I wanted to fetch each row on a seperate page with a get method. how will I be able to do that? for instance i have rows with customer information. how will I be able to display them on seperate pages. ?customerid=343 and from there it will show all that customers information in a table. Im not sure how to explain this. Please help.
  3. So i got this part figured out.. CREATE TABLE category( category_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20) NOT NULL, parent INT DEFAULT NULL); INSERT INTO category VALUES(1,'ELECTRONICS',NULL),(2,'TELEVISIONS',1),(3,'TUBE',2), (4,'LCD',2),(5,'PLASMA',2),(6,'PORTABLE ELECTRONICS',1), (7,'MP3 PLAYERS',6),(8,'FLASH',7), (9,'CD PLAYERS',6),(10,'2 WAY RADIOS',6); SELECT * FROM category ORDER BY category_id; My question is now.. how do I generate html pages where PAGE 1 (ELECTRONICS) Televisions Portable Electronics PAGE 2 (DEPENDING ON PAGE 1 SELECTION) .. Lists here all the childs of electronics.. PAGE 3 ..Lists the subcategory of previous page. Does anyone know what im talking about? PLEASE HELP
  4. So i got this part figured out.. CREATE TABLE category( category_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20) NOT NULL, parent INT DEFAULT NULL); INSERT INTO category VALUES(1,'ELECTRONICS',NULL),(2,'TELEVISIONS',1),(3,'TUBE',2), (4,'LCD',2),(5,'PLASMA',2),(6,'PORTABLE ELECTRONICS',1), (7,'MP3 PLAYERS',6),(8,'FLASH',7), (9,'CD PLAYERS',6),(10,'2 WAY RADIOS',6); SELECT * FROM category ORDER BY category_id; My question is now.. how do I generate html pages where PAGE 1 (ELECTRONICS) Televisions Portable Electronics PAGE 2 (DEPENDING ON PAGE 1 SELECTION) .. Lists here all the childs of electronics.. PAGE 3 ..Lists the subcategory of previous page. Does anyone know what im talking about?
  5. Your getting this out of your mysql database right?
  6. Hey. I'm kind of new to this so I need help on making his the easiest way possible.any help would be appreciated. I'm creating a site for car parts. Let's have 3 examples.. Chevrolet Toyota Volkswagen I want viewers to be able to select on them and be Ripken to a page where they select the model.. From there they can select why kind of part they want. So the question is,how do I create the database and tables and also how do I have the HTML form fetch the correct informaion and create automatic HTML pages. Because what if I add a part for a Saturn ion headlight? Is it possible to have it all updated at once? Please help.
  7. I foung this tutorial online. I installed it. Everything works except when I try to create a new account it says "Registration Failed! Try again". Even tho it says that, i can still see the new account in the database. Here is the link to the tutorial: http://www.ineedtutorials.com/code/php/complete-advanced-login-member-system-php-tutorial May somebody PLEASE help me? Thank you.
  8. doesnt work.. im pretty sure there needs to be somthing in this line: mysql_select_db (test, blog); thanks in advance
  9. sorrryy exclude the font formatting.. mysql_select_db (test, blog); $result = mysql_query("SHOW TABLES"); echo '<ul>'; while($row = mysql_fetch_array($result)) { echo '<li>' . $row[0] . '</li>'; } echo '</ul>';
  10. is it possible to show tables from 2 databases in one list.. how would i make this work???? mysql_select_db ([color=red][b]test, blog[/b][/color]); $result = mysql_query("SHOW TABLES"); echo '<ul>'; while($row = mysql_fetch_array($result)) { echo '<li>' . $row[0] . '</li>'; } echo '</ul>';
  11. yea i know that.. im just wondering if thats possible..
  12. Hey, is it possible to list all the table names in a database on an html page? For example: Database Name: Cars Table Names: -BMW -Mercedes -Volkswagen -Ford -Volvo How do I have it generate that list automatically if I add new tables later on?
  13. Hey, is it possible to list all the table names in a database on an html page? For example: Database Name: Cars Table Names: -BMW -Mercedes -Volkswagen -Ford -Volvo How do I have it generate that list automatically if I add new tables later on?
  14. is this what your talking about? ? <input type=text name="NAME_OF_INPUT" readonly="readonly" value="PUT_TEXT_HERE"> REPLACE "NAME_OF_INPUT" and "PUT_TEXT_HERE" with whatever values you want.
  15. monkeybidz, thanks alot!!! even tho it didnt work i forgot the WHERE tutorialid='3' statement.. thats the only thing i needed to add to my original code. THANKKKS!
  16. heres the problem.. i have a table named "comments" and in this code i am fetching inputs "tutorialid" and "name" what i want to fetch is a certain id from the "tutorialid" how will i go about doing this.. heres part of the code. $sql = "SELECT tutorialid, name FROM comments LIMIT $offset, $rowsperpage"; $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); while ($list = mysql_fetch_assoc($result)) { echo $list['tutorialid'] . " : " . $list['name'] . "<br />"; } for instance.. i want all the rows with the tutorial id "3" can somebody please help? thanks in advance
  17. im sorry, but im a little new to mysql may you please give me an example?
  18. What is the easiest way to make the results display 10 per page? May anybody please help? Here is the code: $commentquery = mysql_query("SELECT * FROM comments WHERE tutorialid='$tutid' ORDER BY date DESC") or die(mysql_error()); $commentNum = mysql_num_rows($commentquery); echo "<table width=\"540\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#25b7c1\"bordercolor=\"#25bc1\"><tr><td><div id=\"currentcomments\" class=\"submitcomment\"><br><h2 class=\"formtitle\">Current Comments</center></h2>\n"; echo "<p align=\"left\"><B><u>" . $commentNum . "</u></b> comments so far (<a href=\"#post\">post your own</a>)</p>"; while($commentrow = mysql_fetch_row($commentquery)){ $commentbb = BBCode($commentrow[4]); $commentDate = formatDate($commentrow[6]); echo "<div class=\"commentbody\" id=\"$commentrow[0]\">\n <p class=\"postedby\" align=\"left\">Posted by <B><u>"; if($commentrow[3]){ echo "<a href=\"$commentrow[3]\">$commentrow[2]</a> "; } else { echo "$commentrow[2] "; } echo "</b></u>on $commentDate </p>\n <p align=\"left\">$commentbb</p>\n \n</div>"; } echo "</div></td></tr></table>"; } function submitComments($tutid2,$tuturl){
  19. i dont need it for just any user.. what I need this for my website.. when I create a new page, i want to place it into a category.. my categories are in different tables... there for i can select an existing table(category) or create a new category if i need it.. is there something simpler I can do? Im just not sure because im new to mysql. thanks
  20. Heres the tag.. <object width="550" height="400"> <param name="movie" value="somefilename.swf"> <embed src="somefilename.swf" width="550" height="400"> </embed> </object>
  21. It still says... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '".$tablename."( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id) please help
×
×
  • 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.