Results 1 to 7 of 7

Thread: mysql ..

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    OCC Team Leader GTC's Avatar
    Join Date: May:2008
    Location: Beverly hills, Sofia, BG
    Posts: 236

    mysql ..

    , , - . submit- "TEXT", , . PHP, ( XAMPP) netb, table1, . - . - owner text, machine text price, . - . , Submit - error . .. ?

    Code:
    <?php
    $owner = $_POST['owner'];
    $machine = $_POST['machine'];
    $price = $_POST['price'];
    
    mysql_connect ("localhost", "admin", "12345") or die ('ERROR: ' . mysql_error());
    mysql_select_db ("netb");
    
    $query="INSERT INTO table1 (owner, machine, price)VALUES ('".$owner.", ".$machine.", ".$price."')";
    
    mysql_query($query) or die ('Error adding your entry');
    
    echo "Database updated with the following data: " .$owner. " ".$machine." ".$price ;
    
    ?>
    , ..

    0.1.8.5.2.6.3.1.9.7

  2. #2
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    mysql_error(). VALUES , .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  3. #3
    OCC Team Leader GTC's Avatar
    Join Date: May:2008
    Location: Beverly hills, Sofia, BG
    Posts: 236
    . - echo, , , - - ..

    0.1.8.5.2.6.3.1.9.7

  4. #4
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    mysql_real_escape_string() . , .
    POST .
    magic_quotes_gpc php . , , -.

    , , echo- ( ).
    PHP- MySQL.
    ... or die() , or die() , , $query:
    echo htmlspecialchars($query), .

  5. #5
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    ( ).
    , *.
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  6. #6
    Nuclear's Avatar
    Join Date: Sep:2004
    Location: , . ()
    Posts: 3,352
    , ' .

    Code:
    $query="INSERT INTO table1 (owner, machine, price)VALUES ('$owner','$machine', '$price')";
    . HWBG !

  7. #7
    OCC Team Leader GTC's Avatar
    Join Date: May:2008
    Location: Beverly hills, Sofia, BG
    Posts: 236
    . , . , guys

    0.1.8.5.2.6.3.1.9.7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |