Search results

  1. M

    action="update.php" make new page :(

    Question 1: Sorry about the vast amount of threads I am making, but don't want to confuse people by posting new questions in the same threads. Here, I have a form, and action script. It updates my database with the values in the form. The only problem with it is that when I click submit, the...
  2. M

    CSS being an arse.

    I have done that, but it still doesn't work :/
  3. M

    CSS being an arse.

    Bascially, I want the "main_text" div go all the way to the bottom of the page, but for some reason width:100%; won't do it :S <!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">...
  4. M

    Deleting from data base using value from form.

    What should I use instead of "die"? I will try and get some books on php, javascript ect... i plan on learning many coding languages, just not yet. And thanks for pointing out the errors.
  5. M

    Deleting from data base using value from form.

    Awesome, that's what I want. Now to adapt it so I can click and image to delete the record, but I know how to do that. I use that at home. can't install things on these computers though. They have some stupid cheap thing which looks like it was coded by a code noob, like me :) Their...
  6. M

    Deleting from data base using value from form.

    <form action="delete.php" submit="post" /> <input type="text" name="ID" /> <input type="submit" /> </form> <?php //Connect to database mysql_connect('localhost', 'martynba_martynb', 'test123'') or die('Error: ' . mysql_error()); //Select table...
  7. M

    Deleting from data base using value from form.

    So, I make it like this?: <?php //Connect to database mysql_connect('localhost', 'martynba_martynb', 'test123'') or die('Error: ' . mysql_error()); //Select table mysql_select_db('martynba_comments') or die('Error (DB): ' . mysql_error()); $ID =...
  8. M

    Deleting from data base using value from form.

    Sorry, I don't understnad what you are saying :S
  9. M

    Deleting from data base using value from form.

    <?php //Connect to database mysql_connect('localhost', 'martynba_martynb', 'test123'') or die('Error: ' . mysql_error()); //Select table mysql_select_db('martynba_comments') or die('Error (DB): ' . mysql_error()); $ID = mysql_real_escape_string($_GET['ID']); $statement = "DELETE FROM...
  10. M

    Deleting from data base using value from form.

    That error should be gone now, I was just messing around with the code.
  11. M

    Deleting from data base using value from form.

    I'm not getting any, thats the weird thing. I think it is just not finding the correct values ect.. http://martynleeball.x10hosting.com/testing/db-m.php Instead of doing that, could I just use this: //Display results echo "<table class=\"comment-table\">"; echo "<tr>"; echo "<td...
  12. M

    Deleting from data base using value from form.

    :( It isnt working :/ And cheers, I have edited my posts, I forgot to remove the password, please could you edit your quote. And another thing, how can I make this: //Display results echo "<table class=\"comment-table\">"; echo "<tr>"; echo "<td class=\"comment-name\">Posted by: $name<div...
  13. M

    Deleting from data base using value from form.

    I don't understand how i would insert the value into the WHERE thingy... is it something elike this: <? mysql_connect('localhost', 'martynba_martynb', 'password') or die('Error: ' . mysql_error()); mysql_select_db('martynba_comments') or die('Error (DB): ' . mysql_error()); $ID = $_GET[ID]...
  14. M

    Deleting from data base using value from form.

    It all works, but I have to put the "ID" value in the php code. How do I drag in a value from a text field? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Administator Tools</title> </head> <body> <form name="dr" action="scripts/delete-r.php"...
  15. M

    Writing to database?

    Fixed the caps on everything. Also, I have found the reason I have had so much trouble with this, with some help from a friend who does not know code at all. <form medthod="post" action="update.php">
  16. M

    Writing to database?

    Here is my code now, but it still isn't working :/ It is just writing "Database Updated With:" on the screen, but no values, and the database isn't updated. <html> <head> <title>Database Test</title> <?php // Connect to the database server mysql_connect('localhost', 'martynba_martynb'...
  17. M

    Writing to database?

    Nope, it is just writing "Database Updated With:" but no data at the end. And credentials?
  18. M

    Writing to database?

    I can read the values in my database which I manually added for testing, but I cannot add new values into the database... I am following this tutorial: http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php Here is my code (Password...
  19. M

    Database connection string?

    That will do, cheers :) Edit: Another question, no point making another thread. 'userpassword' I put my password for the database there, well. Can't the public just select view source code and see the password?
  20. M

    Database connection string?

    I am following a tutorial on how to access a MySQL database; http://teamtutorials.com/web-development-tutorials/how-to-access-a-mysql-database-using-php I have done everything correctly so far, but I am having trouble finding the connection string. I supose I could copy the one from the...
Top