Jump to content

tracy

Members
  • Posts

    177
  • Joined

  • Last visited

    Never

Everything posted by tracy

  1. I'm redoing it now (as I type) and uploading it to a different location.  Might be a while.  Thanks, though. 
  2. I've loaded them up to test them, with proper changes.  No luck.  Still blank pages, no errors.  Pretty impressive looking on your site, wish I could test on mine.  I'll work on it.  Again thanks very much.
  3. Man, that's pretty cool.  Almost exactly what I've been fretting about all day! Thanks. Was this autogenerated? Thanks again.  Amazing.
  4. Somehow when I uploaded a test page it put the box on top of the text on the first line only.  I fixed it.  Looks good.  Thanks. By the way, since you have all those stars by your name... Can you recommend a good tutorial on how to incorporate a check box into a MySQL/PHP table so that if I want to edit or delete a file I can select that file by clicking in the check box beside it (in a browser, not MySQL) and click on edit or delete and be take to the appropriate screen.  Not looking for an easy code supply, just the info so I can learn how to do it.  I have found a lot of info, but in trying to think of how to select the item in the database using a true/false statement from a checkbox...it's kind of hard with my being new to PHP.  I have a thread open on this somewhere but no luck.  Only people telling me to buy and read a PHP book... I have researched this online and in books (2) but no luck. Thanks.
  5. Thanks.  I have one other question, related to this.  When I output this table to the browser, I'm finding it hard to get a good tutorial or instructions on making one of the columns a check box.  That way, if the box is checked and the delete or edit button is clicked, that file that is checked will be opened for editing or deleted, whichever is the case.  I think I know the premise of it, but the actual writing of the exact phrase to get the true/false statement from the checkbox cell is the problem for me.  Any thoughts on where I can get this info?  I'm not asking for you to write it for me, just the info.  Thanks for all your help.  It is appreciated.
  6. I might be misunderstanding you, but I think I have already done that.  I can create a form and use it to add data to the MySQL database.  I can then print that database back to the browser showing what data I just added plus all the previous data.  Just like it should, no problem. I understand how to make a form using html also--with a checkbox.  What I'd like info regarding is how to write the specific few lines of code that tells the PHP/MySQL that the item with the check in the box is the item selected for edit or deletion.  Any thoughts?
  7. I can actually (and have already done it) create a MySQL database, use PHP to insert data into it and have it print out a table to the browser containing the data in the database.  I'm now at the stage of trying to write the PHP for deleting items and/or editing them. The problem is that rather than having to know which item to edit/delete, I'd like to have a table display the data in the table with a check box in one column next to each row.  Then the item that is 'checked' is the item SELECTED for edit or delete.  This check box being displayed is the problem I'm having.  I think I could make another 'column' in the database that is true or false depending on whether the box is checked, but when trying to incorporate all this into html, PHP and MySQL it gets kinda complicated.  I would therefore like a tutorial to view and get a better understanding of it.  Or perhaps an explanation of the basic concept so that I could research it more...like what the correct terminology is for a check box imbedded in a database generated by MySQL and PHP and HTML... I know that I have to query the database table and cause it to be printed to the browser.  I then know that I have to write the commands for the PHP to cause the MySQL to SELECT the data linked to the checkbox...that's what I'm unclear about...if I knew how to SELECT based on the check box I feel I could generate the proper code.  Thanks.
  8. I'm not asking for someone to code it for me...thank you. I can't believe you'd actually take the time to post that remark.  I wouldn't post here without researching it extensively both in print and on the internet... Anyway, what I'm hoping to find is someone kind enough to point me to a tutorial that actually works.  Or maybe a suggestion on one or two of the specific problem areas: 1.  Creating the display table with the check box option 2.  Telling me which files are needed to make it work...for example, one file for the edit/delete, or one file for edit, one for delete... etc. Thanks.  Again, kinda new to PHP...looking for info, not non-constructive criticism.
  9. Assuming I have a table named 'table' with the following categories:  one, two, three, four, five, six, seven,eight... and that I can connect to the MySQL database and enter data into same table through PHP... How would I write the code to display the contents of the table with a 'check box' beside each entry so that I could 'check the box' beside any entry and edit it or delete it. And secondly, how would I actually generate the PHP page that would allow me to delete or edit the entry after I 'select' it from previous?  Kind of new to PHP, so thanks for any help.  I would ideally like a page with the options of add, edit and delete...and when the appropriate 'button' is clicked, the proper php page displays to allow me to make the changes.  I can do the add page, no problem.  I just have trouble with the edit and delete part.  Ideally, I'd like the table contents to display on a page when I click edit or delete (which can be the same button)...then I could 'check the box' next to the item to be edited or deleted and taken to that item's display page for editing or deleting...or something like that. I understand that a select query has to be done to 'get' the item for editing or deleting, but would like that process handled in a table format with a check box for selecting that item... Thanks.
  10. Are you saying that the table, in its ordinary creation, will take into account the longest item and size all cells in that column correctly so that the other column, the blank one, is lined up as I desire?  The reason I ask is that I did this before and it didn't work.  I made the table using php/mysql and it printed it with the items lined up on the left margin and the 'fill in the blanks' boxes were all over the place.  Here is the code: <html> <title>Test Self Form</title> <body> <form action="insert.php" method="post"> Make: <input type="text" name="make" /><br></br> Auto Model: <input type="text" name="model" /><br></br> <input type="submit" /> </form> </body> </html> Thanks.
  11. John- Sorry for the late reply.  I appreciate the effort. I think maybe I'm missing something.  Are these files supposed to be linked from somewhere, like a delete button or add/edit button?  Kinda new to this, so sorry... I can't get it to work.  When I open these php files (dataConn.php or testtable.php) the browser shows a blank page.  I entered some test data in mysql but still blank pages. I also don't understand the picture part.  The last entry of yours about the SRC file... Thanks.
  12. Is there any way to create a display in a browser using PHP and a MySQL table that has an empty check box beside each row.  When a user checks the boxes in said display and then clicks DELETE, for example, those entire rows with the check boxes are deleted from the MySQL table?  Is there a tutorial anywhere?  Thanks. This ad is crazy.
  13. I have a table that I use in a browser to allow 'browsers' to fill in the blanks.  I wonder how I can make all the entry blank cells in that table align together?  In other words, say that one blank to fill in is Make: __________ as in automobile maker.  The next line underneath that is Auto Model:  __________.  They don't align properly because Make has four letters and Auto Model has ten with the space included.  How can I make the blank text boxes (to be filled in by browser) align underneath each other or at least format the table so that this works out that way?  Thanks. 
  14. It looks like this will be the mysql table creation: SQL query:CREATE TABLE `TestTable` ( `stocknumber` VARCHAR( 8 ) NOT NULL , `make` VARCHAR( 4 ) NOT NULL , `model` VARCHAR( 20 ) NOT NULL , `photo` VARCHAR( 30 ) NULL , `five` VARCHAR( 10 ) NOT NULL , `six` VARCHAR( 10 ) NOT NULL , `seven` VARCHAR( 10 ) NOT NULL , `eight` VARCHAR( 10 ) NOT NULL , PRIMARY KEY ( `stocknumber` ) ) ENGINE = MYISAM ; Keep in mind that five, six, seven and eight are simply place holders.  This entire table is just an example only.  I am interested in learning how the code works and looks for a table like this, for example.  Also, I'd like the photo to be a file, not a varchar but phpmyadmin won't allow that (at least not in a way I know)...Also:  It would be great if the photo was automatically thumbnailed. Thanks.  If I need to start a new thread for this I will... I checked out your site, Iobe and it is pretty cool.  Good luck with that.
  15. Thank you but I feel I have gotten this problem resolved.  I would like some code examples of how to output a ten column table from mysql using php.  Or a tutorial site that really works.  Thanks.
  16. you mean with no values set?  maybe...I don't know either.  could you explain what you mean more?  thanks.
  17. Re-wrote, no success... I can write the php code to post to mysql database, no problem.  That lets me know I'm connected fine to mysql. But when I use a form (html) and send that data to insert.php on the server for posting to mysql, it won't work. I'm new to php, but I have written several different test pages, even allowing phpmyadmin to help write the 'proper' insert code.  It still doesn't work.  Absolutely nothing.  Any help is appreciated.  If you know of an easier method using a form to allow web browsers to post to mysql database, feel free to tell me how if you know it works. If you tell me to do something to 'test' this, please remember I'm new to php.  Thanks. THIS IS THE FORM PAGE CODE:  (it simply has a form with two blanks:  one is make as in automobile maker, one is model, as in automobile model) <html> <head> <title>Form</title> </head> <body> <form action="insert.php" method="post">Make: <input type="text" value="" name="make"> Model: <input type="text" value="" name="model"> <input type="submit" value="Submit Query"> </form> </body> </html> THIS IS THE INSERT.PHP PAGE CODE:  (CAPS JUST TO MAKE READING EASIER IN POST) <html> <head> <title>Form</title> </head> <body> <form action="insert.php" method="post">Make: <input type="text" value="" name="make"> Model: <input type="text" value="" name="model"> <input type="submit" value="Submit Query"> </form> </body> </html> By the way, I have set the permissions for insert.php to 7 all the way across. 
  18. Thank you.  Re-writing and testing again.
  19. Thanks for your replies... I'm rewriting and trying again...if that doesn't work I'll likely post the code and re-ask questions.  Thanks again.
  20. Can't write to mysql using html form and php.  Seems like server permissions issue.  Connection fine.  Any ideas?  Thanks.
  21. I can insert data into mysql using php.  When I try to insert data into mysql table using html form, won't work.  Seems like server permissions issue.  Any ideas?  Thanks.
  22. I can connect to mysql via php and insert data.  However, when I try to do this with an html form, no go. Seems like a permission issue on server.  Any ideas? Thanks.
  23. One more note: I think it is an issue with the server...permissions or something. I have written other php codes that write to the mysql and they work fine.  I am mainly interested in knowing more about permissions for file writing on the server, but any help is appreciated.  Thanks.
  24. This is the insert.php file.  The html form is simple and writes to this insert.php file, supposedly.  It has two areas to fill in, one that is a make (as in auto make) and one that is model (as in auto model).  That's all... <html> <body> <?php mysql_connect("localhost","small_user","password"); if (!con) { die('could not connect: '.mysql_error()); } mysql_select_db ('small_whatever'); $sql="INSERT INTO data (Make,Model) VALUES ('$_POST[make]','$_POST[model]')"; echo "one record added"; ?> </body> </html> This is the html form: <html> <title>Test Self Form</title> <body> <form action="insert.php" method="post"> Make: <input type="text" name="make" /> Model: <input type="text" name="model" /> <input type="submit" /> </form> </body> </html>
×
×
  • 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.