Jump to content

plz help me


ahmed17

Recommended Posts

[color=red][b]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 [/b] [/color]
********************************************************
--------------------------------------------------------------------------------

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


[code][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][/code]
Link to comment
Share on other sites

If you want to use PHP with MS Access Database I believe you'll need to use the [url=http://php.net/odbc]ODBC[/url] driver functions. I did a quick search on this and found a tutorial over at [url=http://www.phpbuilder.com/columns/siddarth20000228.php3?page=1]phpbuilder.com[/url] 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
Link to comment
Share on other sites

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:
[code=php:0]$file_dir = "what  i    write    here  ?";[/code]

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:
[code=php:0]$file_dir = $_SERVER['DOCUMENT_ROOT'] . '/images/';[/code]


For this:
[code=php:0]$file_url = "what  i    write    here  ?";[/code]

You put in the url to the file dir, eg mysite.com/images/
[code=php:0]$file_url = "http://www.mysite.com/images/";[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.