Jump to content


Photo

plz help me


  • Please log in to reply
6 replies to this topic

#1 ahmed17

ahmed17
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 02 September 2006 - 08:42 PM

i want to know how i can tie php with ms acess and excel files ...?
note! i am using mysql but i read article say u can tie php with ms acess or excel but
how ?..its the prolobem

********************************************************
--------------------------------------------------------------------------------

hello everybody . i want to know how i can install gd libary of php to use it

note !
i found in extensions folder the dll of gd "php_gd2.dll" and found it included in
php.ini (configuration) ........wat i do ,plz help me ?
*******************************************************
----------------------------------------------------------------------------------

plz help me  to correct this script to upload


[sup] <html>
 <head>
 <title> upload script</title>
 </head>
 <?php
 //file_dir variable on line 6 to store the file path to our upload directory
 $file_dir = "what  i    write    here  ?";
 //$file_url on line 7 to store the URL of the same directory
 $file_url = "what  i    write    here  ?";

 foreach( $HTTP_POST_FILES as $file_name => $file_array ) {
   print "path: ".$file_array['tmp_name']."<br>\n";
   print "name: ".$file_array['name']."<br>\n";
   print "type: ".$file_array['type']."<br>\n";
   print "size: ".$file_array['size']."<br>\n";

   if ( is_uploaded_file( $file_array['tmp_name'] )
     && $file_array['type'] == "image/gif" ) {
     move_uploaded_file( $file_array['tmp_name'], "$file_dir/$file_name")
       or die ("Couldn't copy");
     print "<img src=\"$file_url/$file_name\"><p>\n\n";
   }
 }

 ?>
 <body>
 <form enctype="multipart/form-data" method="POST">
 <input type="hidden" name="MAX_FILE_SIZE" value="51200">
 <input type="file" name="fupload"><br>
 <input type="submit" value="Send file!">
 </form>
 </body>
 </html>[/sup]


#2 ahmed17

ahmed17
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 03 September 2006 - 02:54 PM

plz help me ....plz help me  * 10000000000000000000000000000

#3 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 03 September 2006 - 04:16 PM

Is PHP installed on your local computer?

If it is look in the php.ini file file for this line and uncomment it

;extension=php_gd2.dll

to

extension=php_gd2.dll

and copy that php_gd2.dll file to the windows folder
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 03 September 2006 - 04:31 PM

If you want to use PHP with MS Access Database I believe you'll need to use the ODBC driver functions. I did a quick search on this and found a tutorial over at phpbuilder.com on how to connect to MS Access with PHP.

To install gd on windows. All you have to do is enable the gd extension in the php.ini, as advised in the post above

#5 ahmed17

ahmed17
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 03 September 2006 - 07:41 PM

may god bless you ..i am using local server ....i want any one help me to correct the upload script

$file_dir = "what  i    write    here  ?";

 

$file_url = "what  i    write    here  ?";



#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 03 September 2006 - 10:06 PM

Did you write that code or did someone else write that script for you? If someone else wrote, it'll be best if you ask them. If you wrote then surely you must know.

But anyway. For this:
$file_dir = "what  i    write    here  ?";

You need to put the absoulute path to where the file being uploaded will go to.  For example if you want the uploaded files to go to a folder called images which is in your document root folder, you'll use this:
$file_dir = $_SERVER['DOCUMENT_ROOT'] . '/images/';


For this:
$file_url = "what  i    write    here  ?";

You put in the url to the file dir, eg mysite.com/images/
$file_url = "http://www.mysite.com/images/";


#7 ahmed17

ahmed17
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 04 September 2006 - 05:11 PM

thanks more wildteen88  :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users