Jump to content

Search the Community

Showing results for tags 'mysql undefined index php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Ok so I have been adding an image upload form with a seperate upload thumbnail, that works great. The problem is now that I have added captions to the images I am receiving this error. [caption1] => Caption Text Test [caption2] => [caption3] => [caption4] => [caption5] => [caption6] => [caption7] => [insert] => Insert Article ) [b]Notice[/b]: Undefined index: caption8 in [b]images_upload.php[/b] on line [b]9[/b] Here is the images_upload.php is line 9. <?php $uploader = new Zend_File_Transfer_Adapter_Http(); $uploader->setDestination($destination); $uploader->setOptions(array('ignoreNoFile' => TRUE)); $files = $uploader->getFileInfo(); $filenum = 1; foreach ($files as $file => $info) { $file = "photo{$filenum}"; $caption = $_POST["caption{$filenum}"]; if (isset($_POST["article_id{$filenum}"])) { $article_id = $_POST["article_id{$filenum}"]; } else { $article_id = NULL; } And here is the insert_images.php form I am using to insert the data. The thumbnails use a different script which resembles the images, with variables changed. It workes great, especially before I added captions to the mix, and inserts all data accordingly. I am just puzzled as to why I am getting this error. <?php for ($e = 1; $e <= $thumbfields; $e++) { ?> <p> <label for="thumbnail<?php echo $e; ?>">Thumbnail:</label> <input type="file" name="thumbnail<?php echo $e; ?>" id="thumbnail<?php echo $e; ?>" /> </p> <?php } ?> <?php for ($i = 1; $i <= $photofields; $i++) { ?> <p> <label for="photo<?php echo $i; ?>">Photo <?php echo $i; ?>:</label> <input type="file" name="photo<?php echo $i; ?>" id="photo<?php echo $i; ?>" /> </p> <p> <label for="caption<?php echo $i; ?>">Caption for photo <?php echo $i; ?>:</label> <input value="<?php if ($_POST && $errors) { echo htmlentities($_POST["caption{$i}"], ENT_COMPAT, 'UTF-8'); }?>" type="text" name="caption<?php echo $i; ?>" id="caption<?php echo $i; ?>" /> </p> <?php } ?>
×
×
  • 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.