Jump to content

erok

Members
  • Posts

    62
  • Joined

  • Last visited

Profile Information

  • Location
    fort lauderdale

erok's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. There is a little javascript. But unrelated, different part of the code. just to say good evening etc. Page suppose to retrieve information related to user. If, in previous visit user checked e.g. trans or short or long. That information suppose to appear at user personal page when he/she logged in. If user needs to make changes, he/she should be able make changes and keep the other informations unchanged as previous visit. Problem as i said before, CHROME and OPERA unable to retrive data from phpmyadmin. Actually when i use var_dump i see the variable values in there, Chrome unable hold onto it. Chrome unable to process it. INTERNET EXPLORER and FIREFOX able to.
  2. Hi. I tested with FIREFOX it is working fine - able to insert, update, delete checkbox values. same code with OPERA unable to retrieve checkbox values able to upload and update checkbox values. regards
  3. Thanks for reply i just did it i see this <input type="checkbox" name="len[]" size="9" maxlength="20" value="10" checked /> // checked attribute is actually being applied with chrome
  4. Hi all, i have php code working with INTERNET EXPLORER fine - able to insert, update, delete checkbox values. brief sections of code ; $bea=$dow['bea']; $dow1 = explode(",", $dow['len']); if(in_array(5,$dow1)) $che5="checked"; else $che5=""; if(in_array(10,$dow1)) $che10="checked"; else $che10=""; <input type="text" name="bea" value="<?php echo $bea ; ?>" /> .. <input type="checkbox" name="len[]" size="9" maxlength="20" value="5" <?php echo $che5 ; ?> /> <input type="checkbox" name="len[]" size="9" maxlength="20" value="10" <?php echo $che10 ; ?> /> same code with GOOGLE CHROME unable to retrieve checkbox values able to upload checkbox values. I tried ...$che5="checked=checked"; $che5="checked='checked'"; $che5='checked' ; not helping. Anybody who has experience wih this kind of problem? directing , pointing kindly appreciated erok
  5. erok

    update images

    UPDATE:<input type="checkbox" name="up[]" value="<?php echo $nid=$row['id'] ; ?>" checked /> Now it is working. Thanks for your support
  6. erok

    update images

    I got the following message with phpinfo() function when i tried to update second image. its picture id=2 in database Apache Environment REQUEST_METHOD POST QUERY_STRING no value REQUEST_URI /dakgooduy.php SCRIPT_NAME /dakgooduy.php HTTP Headers Information HTTP Request Headers HTTP Request POST /dakgooduy.php HTTP/1.1 Accept text/html, application/xhtml+xml, */* Referer http://localhost/dakgooduyar.php PHP Variables Variable Value _REQUEST["title"] NEW HOPE 501 _REQUEST["country"] USA . . _REQUEST["MAX_FILE_SIZE"] 2000000 _REQUEST["caption"] Array ( [0] => asli 328 211 [1] => bill 328 502 ) _REQUEST["up"] Array ( [0] => 2 ) _REQUEST["kitchen"] update _POST["title"] NEW HOPE 501 . . _POST["MAX_FILE_SIZE"] 2000000 _POST["caption"] Array ( [0] => asli 328 211 [1] => bill 328 502 ) _POST["up"] Array ( [0] => 2 ) _POST["kitchen"] update _FILES["image"] Array ( [name] => Array ( [0] => [1] => _70132432_vikingship.jpg ) [type] => Array ( [0] => [1] => image/jpeg ) [tmp_name] => Array ( [0] => [1] => C:xampptmpphp5153.tmp ) [error] => Array ( [0] => 4 [1] => 0 ) => Array ( [0] => 0 [1] => 59725 ) )
  7. erok

    update images

    sorry i made it looks like a little bit ambiguous. following code is part of the for loop on the first post // use checkbox value="$nid" to transfer image id to to upload file. UPDATE:<input type="checkbox" name="up[]" value="<?php echo $nid=$row['id'] ; ?>" /> I can updates two images no problem i got following message with var_dump function string(1) "9" string(2) "10" when i tried second image only i got following messege Notice: Undefined offset: 1 in C:xampphtdocsdakgooduy.php on line 166 NULL
  8. erok

    update images

    " So then $_POST['up'] will be an array of checkbox values that were selected. You should start by looping through $_POST['up'] to get each ID value and process the uploaded file from there. " if i want to update two pictures i update both of the pictures. If i want to update first picture only i can update first picture only. I can not update second pictures only. if you look at my first post you can see my codes i m looping through already.
  9. erok

    update images

    Hi Ingolme I use checkbox value="$nid" to transfer image id to to upload file. UPDATE:<input type="checkbox" name="up[]" value="<?php echo $nid=$row['id'] ; ?>" /> so it is coming from checkbox.
  10. erok

    update images

    Hi, I got the following errors. Sounds like i am able to bring (image id) $nid from the form page to here. Somehow this page does not recognize $nid I am trying to bring array $nid Warning: strlen() expects parameter 1 to be string, array given in C:xampphtdocsdakgooduy.php on line 149form ok false /* line 149 / if (!empty($_POST['up']) && isset($_POST['up']) && (strlen($_POST['up']) <= 3) && !empty($_FILES['image']) && isset($_POST['image']) || isset($_POST['caption'])) { $formOk = true ; . . Notice: Undefined offset: 1 in C:xampphtdocsdakgooduy.php on line 166NULL /* line 166 / $nid=$_POST['up'][$i] ; /* line 167 / var_dump($nid) ; I defined $nid= array() ; earlier on the dakgooduy.php Any comment appreciated
  11. erok

    update images

    Hi all, I have two separate images in phpmyadmin database; files on xampp able to update first image alone , able to update two images in two rows. But unable to update if i wanted to update second image alone. <form enctype="multipart/form-data" method="post" action="dakgooduy.php" > . . . $abc = "SELECT id, type, caption FROM dakimages WHERE pid=".$pid." ORDER BY id" or die(); $rs = mysqli_query($con, $abc) ; $icount=mysqli_num_rows($rs) ; for($i=0;$i<$icount;$i++) { $row=mysqli_fetch_array($rs) ; $type=$row['type'] ; $nid= $row['id'] ; $caption=$row['caption'] ; echo $nid ; . . I use checkbox value="$nid" to transfer image id to to upload file. UPDATE:<input type="checkbox" name="up[]" value="<?php echo $nid=$row['id'] ; ?>" /> In upload file "dakgooduy.php" $icount = 2 ; for($i=0;$i<$icount;$i++) { if (!isset($_POST['up'])) $formOk = false ; $path = $_FILES['image']['tmp_name'][$i] ; if (filesize($path) > 2000000 or filesize($path) < 1) { $formOk = false; //// something wrong here echo " form ok false " ; } else { $type = $_FILES['image']['type'][$i] ; $caption = $_POST['caption'][$i] ; $nid=$_POST['up'][$i] ; What might cause this problem? Any conceptual help greatly appreciated
  12. Hi all. I wish i would have better solution. For now, i put each picture to separate tables. At least it is working!
  13. I am NOT saying i am doing the right thing. I have a problem and i am looking to solution. " if you have 2 SQL insert queries then it will insert 2 rows, with whatever data you have in each row. " i tried this and that way inserting the second picture twice. I also tried using array, giving error message. Do not insert any row at all. I tried PREPARE. it insert the row but give blob 0. Means no image inserted. Somehow prepare do not insert image. Maybe it is only for the string data. I need to insert each picture to separate rows. Any help appreciated
  14. " but if you have 2 SQL insert queries then it will insert 2 rows, with whatever data you have in each row. " Does not make difference still insert the second picture to the both rows.
  15. I am trying to upload to two separate rows $path =$_FILES['image']['tmp_name']; $path1=$_FILES['image1']['tmp_name]; This way they all need to go to same row. How can upload two separate pictures to two separate rows?
×
×
  • Create New...