Jump to content

pets2soul

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pets2soul's Achievements

Member

Member (2/5)

0

Reputation

  1. Umm...maybe I didn't explain it clearly...but 10Mb is the size per file uploaded through HTTP; however, there is no file size limit at all for files uploaded through FTP.
  2. Hi scootstah, thanks for your reply. So you are saying what the server determines the file size limit is by the front-end, not the approach where the file is going into? Let me put this also into circumstance: The form itself is not on the same server, the form itself is on another server with another web hosting company.
  3. Dear all, I'm working on a website that is hosted on a server with 10Mb of file size limit via HTTP file uploading approach (eg. PHP file uploading form using move_uploaded_file()), although there's no file size limit via FTP file uploading approach (eg. Using FTP client). Therefore, I was thinking about using PHP FTP functions to bypass the file size limit. However, when I upload file bigger than 10Mb, I still got this error message telling me that my file can't be over 10Mb... So my question is...what exactly are the differences between PHP FTP and FTP Client, that the web server used to determine whether to block the file bigger than 10Mb or not? Thank you very much! Below is my code: <?php echo '<form action="" method="post" enctype="multipart/form-data">'; echo 'Click the Browse button to find the file you wish to upload'; echo '<input type="file" name="add_file">'; echo '<INPUT TYPE="submit" name="upload" value="upload">'; echo '</form>'; if($_POST['upload']) { $add_file = $_FILES['add_file']; //change these values to suit your site $ftp_user_name = 'username'; $ftp_user_pass = 'password'; $ftp_server = 'ftp.domainname.com'; $ftp_root = '/'; //File upload $temp_path = $ftp_root . $add_file['tmp_name']; $target_path = basename($add_file['name']); $max_size = 26214400; if($add_file['error'] == 0 && $add_file['size'] < $max_size) { // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // upload a file ftp_chdir($conn_id, '/root/second/'); if (ftp_put($conn_id, $target_path, $temp_path, FTP_ASCII)) { echo "successfully uploaded " . $target_path; } else { echo "There was a problem while uploading " . $target_path; } } else { echo "There's been an error, please try again later."; } // close the connection ftp_close($conn_id); } ?>
  4. I don't know how you created this page (Whether by programming, or plain HTML), either way...you need the "http://" prefix for your url... The a tag should look like this --> <a href='http://www.facebook.com'>FaceBook<br></a>
  5. So did you have the issue figured out? If not...here's more info for you... On the initial setup of PhpMyAdmin password is not required to access it, but when you do setup a password, you shall be able to see a login page by accessing your PhpMyAdmin, if you don't see this page...it's likely there's something wrong with your config.inc.php setting, and the config.inc.php file should be located in your phpMyAdmin directory. I'm not familiar with WAMP2, but what's your PhpMyAdmin and MySQL version? I can't remember exactly it's PhpMyAdmin or MySQL to blame, but with some older version of the either of them, you will have a to do an Old Password trick to the MySQL command line client somehow...it's also something to look into... Hope these would help!
  6. I'm not a WAMP2 user...but do you have your PHPMYADMIN's config.inc.php set up?
  7. pets2soul

    heeeeeeeelp

    If this is a typo finding game....I would say... $g=$GET_['podrucje_id']; should be $g=$_GET['podrucje_id'];
  8. Dear Keith, Thank you very much! It worked out perfectly! And this is my first time using Foreach, feels good to learn a new thing! Best Regards, AJ
  9. Dear experts, I'm working on a user info updating form, and I only want the amended fields to be updated to the database, I figured this part out, however what caught me is the updating part, where my amended values are stored in an array, and I'm trying to put the values into the SET part with the use of FOR loop, but I can't get the query to work properly...it'd be super duper thankful if anyone can help me with it. Below is my code: $diff_num = count($diff_info); $diff_value = array_values($diff_info); $diff_key = array_keys($diff_info); for($i = 0; $i < $diff_num; $i++) { $db_update = "AND " . $diff_key[$i] . " = '" . $diff_value[$i] . "' "; $query = "UPDATE db_table SET field_one = '$value_one' " . $db_update . " WHERE field_some = '$value_some'"; if (mysql_query($query)) { return true; } else { return false; } }
  10. I would say...LEFT JOIN both tables...like this: SELECT table1.number_x, table2.number_y FROM table1 LEFT JOIN table2 ON table1.userid = table2.userid ORDER BY table1.id ASC
  11. Dear fenway, Thanks for the reply. That was what I figured, however I'm requested to go by the 2nd method - the translation one, and it seems to be the last efficient one. My supervisor was worried that if we go by the duplicate records one, it may overload the MySQL...but personally, I don't think 2000 records (assuming there are 500 products in 4 languages) is too many for a database....well...I don't know~
  12. I think it depends on...what's in the CLID column for the employees not taking any class... Say if CLID column is left empty...then you can put WHERE CLID = "" in another hand, if CLID column is NULL...then... WHERE CLID = NULL That's the simplest way I can think of....hope it helps...
  13. You might wanna try putting: WHERE Publisher_name LIKE '%and%' in your query...hope this helps!
  14. Alright, I was given a third option: 3. 1 product description table, each info be inserted in 4 different columns, such as - columns: id | product_no | product_color_en | product_color_fr | product_color_de | product_color_whatever.... Any suggestions? Thank you!
  15. Dear all, I'm working on an multilingual website, and would like to seek for some suggestions / opinions over the database structure. The current situation is...we are starting up with 4 languages, about 450 products, more languages may be added in the future. So far we came up with 2 database management ideas: 1. Select products from 1 product description table, each product to have 4 entries, each in a different language. 2. Select prodcuts from 1 product description table, each prodcut to have 1 entry in a preset language, and then match the result with a translation table to display product info (Such as product name, colors, elements...etc) in different languages. Base on any relevent experience you might have, which option would you suggest? and why? or is there any other way to do it? Thank you!! Best Regards, AJ
×
×
  • 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.