Re: [PHP] any ideas : Unexpected character

2002-02-14 Thread Will Hives

== "image/jpg" || $type == "image/gif" || $type ==
"image/pjpeg" || $type == "image/jpeg"){ // is this a valid image?
 
 $time_tmp = time();
 $time_tmp = substr("$time_tmp", -4);
 $filename = $time_tmp._.$name; // just in case someone
uploads matched filenames.
 $savepath = "/home/*/***/php/".$filename;  //
change the path here.  make sure the directory it is going to can be written
to by the web user.
 
 $moved = move_uploaded_file($file, $savepath); // place the
file on the server's filesystem
 $path = $filename;
 
 } else { // wrong file type
 $path = "Sorry, but the file type of this file is not
recognised. Please check and try again.";
 }
 } else { // upload failed.
 $path ="Sorry, but the upload failed. Please try again in a
short while.";
 }
 return $path;
 }
 
 // uploaded file info-zone - prepare variables to be passed to the upload
function
 
$name = $HTTP_POST_FILES['picture']['name']; // orginal name
$type = $HTTP_POST_FILES['picture']['type']; // get MIME type of file
 
$path = fileUpload($name,$type,$picture); // yer actual upload function call

// I'd recommend you check the value of $path here - if it contains a text
string starting with "Sorry" then something has failed.

// and off to the database it goes.
$sql = "INSERT INTO $table_name (id, name, email, picture_name)
VALUES ('$id', '$name', '$email', '$path') ";

$result = mysql_query($sql, $connection) or die ("couldn't execute query");





in article 005301c1b576$31479df0$0a0a@AERIS, Girish Nath at
[EMAIL PROTECTED] wrote on 2/14/2002 4:39 PM:

> Hi
> 
> I got this error :
> 
> Warning: Unexpected character in input: ' in
> /home/altdesign/public_html/php/new admin/do_addauthor.php on line 14
> 
> Can you post the section around Line 14 from do_addauthor.php so we can take
> a look at it ?
> 
> Regards
> 
> 
> Girish
> --
> www.girishnath.co.uk
> 
> 
> - Original Message -
> From: "Will Hives" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 14, 2002 4:34 PM
> Subject: [PHP] any ideas : Unexpected character
> 
> 
> 
> I have put together this script with the help of some of you kind members
> here. It seems to do what I set out for it to do, but when it finished the
> upload it comes up with the following error:
> 
> Unexpected character
> 
> try for yourself: http://www.alt-design.net/php/new%20admin/add.php
> 
> I would be very grateful for any ideas.
> 
> Cheers
> Will
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] any ideas : Unexpected character

2002-02-14 Thread Will Hives


I have put together this script with the help of some of you kind members
here. It seems to do what I set out for it to do, but when it finished the
upload it comes up with the following error:

Unexpected character

try for yourself: http://www.alt-design.net/php/new%20admin/add.php

I would be very grateful for any ideas.

Cheers
Will



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] file upload and change name

2002-02-09 Thread will hives

Hi,

Does anyone know how to change the name of and image and save the new name
to the database?

I know how to do a standard file upload, but can't seem to get the new new
to be saved into the databaseany pointers would be fantastic.

Cheers
Will


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Upload script with user admin

2002-02-01 Thread Will Hives

That's cool.

How do you then delete and edit that image?

Will









in article [EMAIL PROTECTED], Lerp at
[EMAIL PROTECTED] wrote on 2/1/2002 5:07 PM:

> Hi there, here's a bit of code to get you started. It includes a form that
> allows uploads, and the code to process the upload on the receiving page.
> Basically, you have a form that allows an upload of a file on one page, and
> some code on the receiving page to insert a path to that file in the
> database and store the newly uploaded file in a directory on the webserver.
> Of course you'll have to ensure that you have the proper write and read
> permissions on that folder. There are a few 'print' lines sprinkled
> throughout the code. For debugging you might want to un-comment them to see
> how everything is working.
> 
> Hoe this helps you out!
> Joe/Lerp :)
> 
> 
> Here's a common form that allows you to upload a file (say an image or any
> type of file for that matter) to the
> db
> 
> 
> 
> Upload Photo: type='file' name='userfile'> value='Upload!!!'>
> 
> end of upload form
> ##
> 
> 
> start of upload process to db
> 
>  
> 
> #$userfile is the file being uploaded
> 
> 
> 
> 
> //print $userfile . "";
> //print $userfile_name . "";
> 
> //determine file size -- if too big ( greater 50kb) then redirect
> $siz = filesize($userfile);
> //print $siz;
> 
> $ext = substr($userfile_name, -4);
> 
> 
> // if the file not of type 'jpg' then redraw out upload form
> if($ext != ".jpg"){
> print "The photo you
> attempted to upload was of the wrong file type. Please ensure that the file
> type is a 'jpg'.";
> print " enctype='multipart/form-data'> style='font-family: Verdana; font-size: 8pt;'>";
> print "";
> print "";
> print "";
> print "";
> print " action='photos.php'> value='« Photos' style='background-color: #FF; font-family:
> verdana; font-weight: bold; color: #363C70; font-size:
> 10pt;'>";
> print "";
> print " src='images/pixel_transparent.gif' width='1' height='1' border='0'
> alt=''>";
> print " height='341'>";
> print "";
> print " ";
> print " width='1' height='1' border='0' alt=''>";
> print "";
> print " height='17' border='0' alt=''>";
> print "  href='contact.php' class='link_white_02'>Send us some
> feedback!";
> print "";
> 
> exit;
> }
> 
> if ($siz >= 51200){
> 
> //redraw upload form
> print "The photo you
> attempted to upload was too large in file size. Please ensure that the file
> size does not exceed 50kb.";
> print " enctype='multipart/form-data'> style='font-family: Verdana; font-size: 8pt;'> name='submit' value='Upload' style='font-family: Verdana; font-size:
> 8pt;'>";
> print "";
> 
> }
> elseif ($siz < 51200)
> {
> 
> $timestamp = time();
> $userfile_name = $timestamp.$userfile_name ;
> 
> // copy the file being posted -- remember to escape backslashes!!!
> if(copy($userfile, "/ez/golfPHP/pics/". $userfile_name)){
> print "Your photo has
> been uploaded and is viewable in the photo gallery." ;
> }
> else
> {
> print "A problem was
> encountered during your photo upload.";
> }
> 
> $patharola = "pics/". $userfile_name;
> //print $patharola;
> 
> $caption = "No Caption.";
> 
> // insert path into database here
> file://connect to db
> $connectionToDBid = odbc_connect("golf", "joegolf", "joegolf");
> 
> //create query statement
> $sqlr = "INSERT INTO PHOTO (golferid, photo, caption, datesubmitted) VALUES
> ('$sesgolferid' , '$patharola', '$caption', '$todaysdate' )";
> //execute the sql statement (query) on the connection made
> $resultset = odbc_do($connectionToDBid, $sqlr);
> 
> //grab the photoid from db
> $sqlid = "SELECT @@IDENTITY AS NewId";
> $napid = odbc_do($connectionToDBid, $sqlid);
> $photoid = odbc_result($napid, 1);
> 
> //print "Photo Id is: " . $photoid . "";
> 
> // close the connection
> odbc_close($connectionToDBid);
> 
> 
> 
> ?>
> 
> end of insert to db process
> ##
> 
> 
> 
> 
> 
> 
> 
> 
> "Artisthotel" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> Hi,
>> 
>> I need an upload script that lets predefined users log in and upload
> files.
>> Does such a script exist?
>> 
>> Regards
>> JEns
>> 
>> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing uploaded file

2002-01-31 Thread Will Hives

It uploads it to: /home/€€/€€/php/
and renames it with the article ID number + the original name eg.
41button.gif

should that work??? It does!!! How would you suggest doing it??



in article [EMAIL PROTECTED], Jason Wong at
[EMAIL PROTECTED] wrote on 1/31/2002 3:00 AM:

> On Thursday 31 January 2002 05:13, will hives wrote:
>> I have this version when I add the image on the add article page, and that
>> works fine...
>> 
>> 
>> 
>> if ($picture != 'none') {
>> 
>> $path = "/home/€€/€€/php/";
>> $path1 = "http://www.€€.net/php/";;
>> $b_id = mysql_insert_id();
>> $new_pic_name = "$b_id$picture_name";
>> $imageFile = $path1.$new_pic_name;
>> 
>> copy($picture,$path . $new_pic_name);
>> 
>> 
>> it's just when it comes to editing the image???
> 
> Honestly, I don't see how this code will work. Are you saying that after
> uploading your image, the above code will copy the uploaded image into
> /home/xxx/xxx/php/new_pic_name?
> 




Re: [PHP] Editing uploaded file

2002-01-30 Thread will hives

I have this version when I add the image on the add article page, and that
works fine...



if ($picture != 'none') {

$path = "/home/€€/€€/php/";
$path1 = "http://www.€€.net/php/";;
$b_id = mysql_insert_id();
$new_pic_name = "$b_id$picture_name";
$imageFile = $path1.$new_pic_name;

copy($picture,$path . $new_pic_name);


it's just when it comes to editing the image???

Sorry about this is must be like banging your head against a brick wall.

Cheers
Will





in article [EMAIL PROTECTED], Jason Wong at
[EMAIL PROTECTED] wrote on 30/1/02 5:56 pm:

> On Wednesday 30 January 2002 19:27, will hives wrote:
> 
>> THIS IS THE DOING EDIT SCRIPT:
> 
> [snip]
> 
>> if ($picture) {
>> 
>> $path = "/home/€€/€€/php/";
>> $path1 = "http://www.€€.net/php/";;
>> $b_id = mysql_insert_id();
>> $new_pic_name = "$b_id$picture_name";
>> $imageFile = $path1.$new_pic_name;
>> 
>> copy($picture,$path . $new_pic_name);
>> 
>> 
>> }
> 
> IIRC we've been through this before. Please read the manual. You *need* to
> understand how to handle uploaded files (by reading the manual). The above
> code simply would not work.
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing uploaded file

2002-01-30 Thread will hives

Jason,

here it all is

thanks for this...
Cheers
Will


HTML EDIT UPLOAD PAGE:


my contact management system: add a contact






">
  
 
  Name & email information
   

 
  
name:
  " size=35
maxlength=75>

email:
  "
size=35 maxlength=75>
  
File 
to Upload:



http://www..net/php/";;
$imageFile = $path1.$pic_name;


 
?> 
">

  
   

 
  



  




  






THIS IS THE DOING EDIT SCRIPT:

http://www.€€.net/php/";;
$b_id = mysql_insert_id();
$new_pic_name = "$b_id$picture_name";
$imageFile = $path1.$new_pic_name;

copy($picture,$path . $new_pic_name);


}



?> 




my contact management system: add a contact



  
 
  Name & email information
   

 
  
name:

  

email:
  
  

File
to Upload:


http://www.€€.net/php/";;
$imageFile = $path1.$new_pic_name;


if ($new_pic_name == "$id") {

print ("http://www.€€.co.uk/images/no_image_available.gif\";
width=\"162\" height=\"113\" border=\"0\">");
   
} else { 
  
  
print "";


   
 
 }
 ?>
 
 
 
 
  
  
  
   

 
  



  




  















in article [EMAIL PROTECTED], Jason Wong at
[EMAIL PROTECTED] wrote on 30/1/02 9:46 am:

> On Wednesday 30 January 2002 17:10, will hives wrote:
>> The code attached was just the code which ran the html form there is
>> another page which contains all the form details, this code just does the
>> editeing and shows you what it's done.
> 
> Could you post the code which does the editing and, in particular, the
> uploading of the image file?
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing uploaded file

2002-01-30 Thread will hives

The code attached was just the code which ran the html form there is another
page which contains all the form details, this code just does the editeing
and shows you what it's done.

Cheers
Will


in article [EMAIL PROTECTED], Jason Wong at
[EMAIL PROTECTED] wrote on 30/1/02 3:20 am:

> On Wednesday 30 January 2002 05:32, will hives wrote:
> 
> Please do not use HTML mail, thanks!
> 
>> I have produced an admin area which allows users to add, edit and delete
>> stories plus images. Everything has gone great, thanks to all of you who
>> answered previous postings.
>> 
>> Just stuck on the very last point...editing...the script below updates the
>> name and email fine, but uploading a new image it does not do. Does any one
>> have any ideas why the image upload is not working...it echos the new name
>> but does not upload the new file
> 
> 1) You haven't defined a form using  so it probably wouldn't
> work in NN.
> 
> 2) You *need* to define a form specifying the enctype if you're going to be
> uploading stuff:
> 
> 
> 
> 3) You don't have any input boxes, all you have is a submit button. What are
> people supposed to be editing?
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Editing uploaded file

2002-01-29 Thread will hives

I have produced an admin area which allows users to add, edit and delete
stories plus images. Everything has gone great, thanks to all of you who
answered previous postings.

Just stuck on the very last point...editing...the script below updates the
name and email fine, but uploading a new image it does not do. Does any one
have any ideas why the image upload is not working...it echos the new name
but does not upload the new file

Thanks in advance 

Cheers 
Will 




PHP:


http://www.main.net/php/";;

$b_id = mysql_insert_id();

$new_pic_name = "$b_id$picture_name";

$imageFile = $path1.$new_pic_name;



copy($picture,$path . $new_pic_name);





}







?> 









my contact management system: add a contact







  

 

  Name & email information

   



 

  

name:



  



email:

  

  



File

to Upload:





http://www.main.net/php/";;

$imageFile = $path1.$new_pic_name;





if ($new_pic_name == "$id") {



print ("http://www.main.co.uk/images/no_image_available.gif\";
width=\"162\" height=\"113\" border=\"0\">");

   

} else { 

  

  

print "";





   

 

 }

 ?>

 

 

 

 

  

  

  

   



 

  







  









  














-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] move_uploaded_file() query

2002-01-25 Thread will hives

in article [EMAIL PROTECTED], Jason Wong at
[EMAIL PROTECTED] wrote on 25/1/02 3:14 pm:

> On Friday 25 January 2002 17:35, Will Hives wrote:
> 
>> Sorry for my past ignorance using this news site forum I can only out this
>> down to my lack of knowledge.
>> 
>> I have been work on me first script for some time now and have been making
>> good progress up until now. I have a script that adds a author to the
>> database, ID, Name, Email, Picture Name.
>> 
>> When a author is added it uploads their details plus it uploads and renames
>> the image...that is working fine. It all falls down when I try and call the
>> new file name to show the picture. It is uploading the original file name
>> to the database and not the renamed version.
>> 
>> I would be very grateful for any pointers on how this small problem can be
>> solved. I hope this makes more sense than previous threads I have
>> submitted.
>> 
>> Cheers
>> Will
>> 
>> Here is the script as it stands:
>> 
>> $sql = "INSERT INTO $table_name (id, name, email, picture_name)
>> VALUES ('$id', '$name', '$email', '$picture_name') ";
>> 
>> $result = @mysql_query($sql, $connection) or die ("couldn't execute
>> query");
>> 
>> if ($picture != "") {
>> 
>> $path = "/home/main/main/php/";
>> $datee = date("sdFy");
>> move_uploaded_file($picture,$path . $datee . $picture_name);
>> 
>> }
> 
> Is this the *full* script? I don't see where you are setting $picture_name?
> 
> Also what you are inserting into the database is not the same as what you are
> renaming your file to (you're adding a date string to the filename). Do you
> have a procedure to resolve the correct filename when retrieving the data
> from the db?
> 
No I don't have a procedure to retrieve the new file name that's what I am
looking to do. I don't know how to write that new name into the database.


Picture name is the file name that is being inserted into the database (THIS
IS THE OLD FILE NAME)from the html form.

The browse field is named 'picture' (see all code below) the name that the
database is capturing is not the new name of the fill ie. not the one that
has the date inserted at start.

Thank you for your help

Cheers
Will



html form/


my contact management system: add a contact





  
 
  Name & email information
   

 
  
name:
  

email:
  
  

File
to Upload:


  
   

 
  



  




  






php script/

 




my contact management system: add a contact



  
 
  Name & email information
   

 
  
name:

  

email:
  
  

File
to Upload:
  http://www.main.net/main/$picture_name";; ?>>
  
  
   

 
  



  




  




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] move_uploaded_file() query

2002-01-25 Thread Will Hives

Sorry for my past ignorance using this news site forum I can only out this
down to my lack of knowledge.

I have been work on me first script for some time now and have been making
good progress up until now. I have a script that adds a author to the
database, ID, Name, Email, Picture Name.

When a author is added it uploads their details plus it uploads and renames
the image...that is working fine. It all falls down when I try and call the
new file name to show the picture. It is uploading the original file name to
the database and not the renamed version.

I would be very grateful for any pointers on how this small problem can be
solved. I hope this makes more sense than previous threads I have submitted.

Cheers 
Will 

Here is the script as it stands:

$sql = "INSERT INTO $table_name (id, name, email, picture_name)
VALUES ('$id', '$name', '$email', '$picture_name') ";

$result = @mysql_query($sql, $connection) or die ("couldn't execute query");

if ($picture != "") {

$path = "/home/main/main/php/";
$datee = date("sdFy");
move_uploaded_file($picture,$path . $datee . $picture_name);

}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] nearly there...just one more

2002-01-24 Thread will hives

I have managed to set the file upload to change the name of the file when
uploading, but when the file is uploaded it takes the original file name not
the renamed one

image upload box is named 'picture' how do I get it to call the new file
name

Thank you for your help so far everyone...

 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Increment help..please

2002-01-24 Thread will hives

I did that with this script and it works fine, but the reason I am doing it
is so I can then give the image which is uploaded the story ID. But for some
reason I can't get it to work... here is the auto_increment script any ideas
of how to add the ID to the image?? I would be very great ful if you
could amend the script (as I am a newb I can work things out once they have
been done if that makes any sense)

cheers will
 




my contact management system: add a contact



  
 
  Name & email information
   

 
  
name:

  

email:
  
  

File
to Upload:
  http://www.main.net/images/$picture_name";; ?>>
  
  
   

 
  



  




  

 


in article 004501c1a511$642b4930$a023b1cf@win2k, Tyler Longren at
[EMAIL PROTECTED] wrote on 24/1/02 7:57 pm:

> Why don't you just set auto_increment on the id field in the database table?
> 
> Tyler
> 
> ----- Original Message -
> From: "will hives" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 24, 2002 1:43 PM
> Subject: [PHP] Increment help..please
> 
> 
>> please help I'm a newb and this is really messing with my head. All I want
>> to know is what do I need to add to this script to allow it to increment
> the
>> ID number. pleasee.
>> thank you very much for a simple boy
>> 
>> Will
>> > 
>> $db_name = "altone";
>> 
>> $table_name = "author";
>> 
>> 
>> 
>> $connection = @mysql_connect("www.myserver.net", "test", "will") or die
>> ("couldn't connect.");
>> 
>> $db = @mysql_select_db($db_name, $connection) or die ("couldn't select
>> database.");
>> 
>> $sql = "INSERT INTO $table_name (id, name, email, picture_name)
>> VALUES ('$id', '$name', '$email', '$picture_name') ";
>> 
>> $result = @mysql_query($sql, $connection) or die ("couldn't execute
> query");
>> 
>> 
>> 
>> 
>> 
>> if ($picture != "") {
>> 
>> 
>> move_uploaded_file($picture, "/home/mine/yep/php/$picture_name");
>> 
>> 
>> }
>> 
>> 
>> 
>> 
>> ?>
>> 
>> 
>> 
>> 
>> my contact management system: add a contact
>> 
>> 
>> 
>> 
>> 
>> Name & email information
>>  
>> 
>> 
>> 
>> 
>> name:
>> 
>> 
>> 
>> 
>> email:
>> 
>> 
>> 
>> File
>> to Upload:
>> http://www.myserver.net/php/$picture_name";; ?>>
>> 
>> 
>>  
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Cheers
>> Will
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Increment help..please

2002-01-24 Thread will hives

please help I'm a newb and this is really messing with my head. All I want
to know is what do I need to add to this script to allow it to increment the
ID number. pleasee.
thank you very much for a simple boy

Will 
 


 
 
my contact management system: add a contact
 
 


 
Name & email information
  
 
 
 

name:


 
 
email:

 
 
File
to Upload:
http://www.myserver.net/php/$picture_name";; ?>>
 
 
 
 
 


 
 

 

 
 
 
 
 


Cheers 
Will


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] file upload with story

2002-01-21 Thread will hives

Please can someone help, I can't find any answers anywhere

I have this code:



it's really just an online contacts book, what I want to do as have the
ability to upload an image with the record.

Then when the contact details are viewed it shows the also uploaded image.

How do I add that code into this...any help would be fantastic.

Cheers
Will


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] News story with image - help

2002-01-21 Thread Will Hives

in article [EMAIL PROTECTED], Nick Wilson at
[EMAIL PROTECTED] wrote on 1/21/2002 1:36 PM:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> * On 21-01-02 at 14:32
> * Will Hives said
> 
>> I guess you must all be getting very bored with this type of question..but
>> away.. I have recently put together a simple news section which allows admin
>> people to add, edit and delete stories from the site...I would like to add
>> the function of adding an image to a story...I have managed to use the
>> upload image script ok but can't work out how to link the image to the story
>> ID.
> 
> When you say link it, what would be the purpose? If you have many
> stories and many pictures that's one thing but if it's not so many then
> that is another.
> Presuming your id's are the keys to the database then perhaps you could
> re-name the image to include that key? (I have no idea off hand how to
> do this but I'm sure it's relatively simple)

Sorry when I say link I mean that the story has an image with it so when the
story header is clicked it shows the full story with imagedoes that make
any sense?

Will









> 
> - -- 
> 
> Nick Wilson
> 
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
> 
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
> 
> iD8DBQE8TBlGHpvrrTa6L5oRAg/QAJ9Ust0H/IB6jqkipGY89rG+NVxvWQCcC20Q
> 1aZ/0iT5Knwy6G0e0hhiRmk=
> =Zmne
> -END PGP SIGNATURE-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] News story with image - help

2002-01-21 Thread Will Hives

I guess you must all be getting very bored with this type of question..but
away.. I have recently put together a simple news section which allows admin
people to add, edit and delete stories from the site...I would like to add
the function of adding an image to a story...I have managed to use the
upload image script ok but can't work out how to link the image to the story
ID.

Is there any examples or does anyone have any suggestions?

Thanks for reading this.

Cheers
Will


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]