error message of php scripts

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 83
Joined: Thu Jun 03, 2004 11:27 am

Fri May 27, 2005 10:09 am

Can anyone help me to figure out what is the problem of this php codes, I have followed exactly the tutorial said by this url:
Thanks alot.
Here are codes:

Code: Select all

<?php include '../Connections/linker.php'; 
 // initialization
 $photo_upload_fields = '';
 $counter = 1;
// If we want more fields, then use, preupload.php?number_of_fields=20
 $number_of_fields = (isset($_GET['number_of_fields'])) ?
   (int)($_GET['number_of_fields']) : 5;
// Firstly Lets build the Category List
 $result = mysql_query('SELECT category_id,category_name FROM gallery_category');
 while($row = mysql_fetch_array($result)) {
   $photo_category_list .= <<<__HTML_END
<option value="$row[0]">$row[1]</option>\n
 mysql_free_result( $result );   

 // Lets build the Image Uploading fields
 while($counter <= $number_of_fields) {
   $photo_upload_fields .= <<<__HTML_END
 Photo {$counter}:
 <input name="photo_filename[]"
type="file" />
 <textarea name="photo_caption[]" cols="30"

 // Final Output
 echo <<<__HTML_END
<title>Lets upload Photos</title>
<form enctype="multipart/form-data"
 action="upload.php" method="post"
 <table width="90%" border="0"
   align="center" style="width: 90%;">
     Select Category
     <select name="category">
   <!—Insert the image fields here -->
     <input type="submit" name="submit"
       value="Add Photos" />

Edit by Alexei Kubarev (inserted code tags)

User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Sun May 29, 2005 7:24 pm

please also let us know the problem with your script...
and use the [ CODE ] tags to show your code

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Mon May 30, 2005 12:44 am

I had to edit the post.. sorry :)
Best Regards,
Alexej Kubarev
Zend Certified Engineer
Image Image

Post Reply