• 08-12-2009, 19:26:05
    #19
    Üyeliği durduruldu
    Bu halde ama olmuyor bir turlu edit dediginiz zaman yeni sayfada hepsi dogru bir sekilde aciliyor fakat degisiklik yapip submit dediginizde sayfa yenileniyor ve hicbirsey degismiyor ve icerik dizilen sayfaya baktigimizdada 0 id li bir icerik olusmus oluyor :S


    http://www.ctuchicago.com/admin/inde...admin=showtemp

    Alıntı
    <?php
    include("inc/db.php");

    $tempID = $_GET["tempID"];

    $read = mysql_query("SELECT * FROM temp_content where temp_id='{$tempID}'");
    $write = mysql_fetch_array($read);

    $id = $write['temp_id'];
    $name = $write['temp_name'];
    $column = $write['temp_column'];
    $system = $write['temp_system'];
    $feature = $write['temp_feature'];
    $image = $write['temp_image'];
    $thumb = $write['temp_thumb'];
    ?>

    <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">
    <table>
    <tr>
    <td><input type="text" name="tp_id" value="<?php echo $tempID; ?>"></td>
    <td><input type="text" name="tp_name" value="<?php echo $name; ?>"></td>
    <td><input type="text" name="tp_column" value="<?php echo $column; ?>"></td>
    <td><input type="text" name="tp_system" value="<?php echo $system; ?>"></td>
    <td><input type="text" name="tp_thumb" value="<?php echo $thumb; ?>"></td>
    <td><input type="text" name="tp_image" value="<?php echo $image; ?>"></td>
    <td><input type="text" name="tp_feature" value="<?php echo $feature; ?>"></td>
    <td><input type="submit" value="Submit" /></td>
    </tr>
    </table></form>

    <?php
    $edittemp = mysql_query("
    UPDATE temp_content
    SET temp_id = '{$_POST['tp_id']}' &&
    temp_name = '{$_POST['tp_name']}' &&
    temp_column = '{$_POST['tp_column']}' &&
    temp_system = '{$_POST['tp_system']}' &&
    temp_feature = '{$_POST['tp_feature']}' &&
    temp_image = '{$_POST['tp_image']}' &&
    temp_thumb = '{$_POST['tp_thumb']}'
    WHERE temp_id = '{$tempID}'
    ");

    if($edittemp) {
    header("Location: index.php?admin=showtemp");
    } else {
    }
    ?>
  • 10-12-2009, 14:46:49
    #20
    Üyeliği durduruldu
    Arkadaslar sorunu hallettim bu konuda yardimci olan butun arkadaslara cok tesekkur ederim en son yapilandaki hata da UPDATE komutunda && kullanimi yuzundenmis onlarin yerine , kullandim sorun ortadan kalkti.

    Bu konudada yanlis anlasilmak istemem adam basindan sagma kod yazmis bizden kodlamamizi istiyor gibi dusunmeyin ben 6-7 ay oldu php kursuna gideli ve unuttum ne ogrendiysem simdi simdi hatirlamaya basliyorum ve butun hatalarimi gordum birdaha yapmicam ins. zaten bu konuda en zoru duzenlemeydi onuda kavradim sayilir arkadaslar Tesekkurler yeniden.