Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by PFMaBiSmAd

  1. That would indicate that the upload worked (zero error element and a specific file size.) The problem is occurring in something the resize_image() function is doing or in the parameter values being passed into that function.

     

    Since black output images are being produced (I'll assume that they were at least in the correct destination folder and of the correct three different sizes as specified by the $GLOBALS['config'] values), what the resize_image() function code is doing, would be where to look next.

     

    Where there any other php errors being reported in the code corresponding to the resize_image() function?

  2. Given that you are trying to insert an empty string '' into the user2 column, I would expect that error.

     

    BTW - you cannot use data values derived from - mysql_num_rows($req2))+1. In modern, multi-taking, interrupt-driven, operating systems, concurrent operations can change the number of rows in a table, making that value incorrect. If you need a specific id value, you need to get that actual value from where it is being assigned.

  3. You are approaching this problem from the tail-ass end and trying to get someone who hasn't even seen that part of the animal to tell you the eye color of the animal it is attached to.

     

    Is this an open-source 3rd party script that someone can just download the whole thing from the author? Snippets of it where errors are being reported at aren't where the problem is occurring at. Also, from the code you have posted, it doesn't have any/good error checking logic to prevent follow-on errors when something didn't occur perfectly in a previous step. Just because if(is_file($file_data['tmp_name'])){ is true, doesn't mean that the upload worked.

     

    One of the possibilities is that the upload is failing. What does adding the following, right before the calls to the resize_image() function, show -

     

    echo '<pre>',print_r($file_data,true),'</pre>';

  4. What you are asking is not possible, unless you pass the file through your server.

     

    The client/browser making the http request for the download file must also supply the authentication as part of that http request. Anything thing you do through the client/browser can be seen or captured by the person using that client/browser.

     

    The only 'secure' way of doing this, that doesn't expose the actual username/password to a visitor, is if the download site has an API that provides a unique/limited-use access token that you could then output to the client/browser to submit to the download site to provide the authentication.

  5. The server-side code that you did post, isn't even checking if a form has been submitted. It's likely the browser is (re)requesting the page for some other purpose that isn't a POST request or perhaps is submitting a post request itself, in addition to the flash, that doesn't contain any data.

     

    What's the HTML of your page containing this flash form? It's likely invalid and one browser type is handling it differently than the other.

  6. You probably have other things before or after the data, such as tabs, spaces, or a \r along with the \n. Try the following -

     

    <?php
    $members = file("postcodes.txt"); // get all the lines at once
    $members = array_map('trim',$members); // trim everything
    if(in_array("SE5", $members)){
       echo "Got you";
    }

  7. If you have or have access to the actual database, you can use any database management tool to get a .sql dump that would contain the table structure(s).

     

    If you can execute select queries, you can use a SHOW CREATE TABLE tbl_name query to get the table structure.

     

    After performing a query, you can access the meta data returned by that query using functions like - mysql(i)_fetch_field(s)

  8. It's straight forward, but you must specifically structure your client-side code to use ajax on a web page. The server-side code doesn't change much. It still accepts a http request, validates input, produces a result, and outputs it back to the client. The format of the output needs to take into account how it will be used in the client (is it just a block of text that is displayed or is it data that the javascript uses for some purpose, in which case you would output it as JSON encoded data.)

     

    There are countless examples posted all over the Internet.

  9. If you want to do something on a web page without refreshing/redirecting, you need to use AJAX to make the http request. Jquery is a popular javascript library that will let you easily write client-side code to make ajax requests and display the returned information on a web page.

  10. If you are on a shared web server, you would only have the ability to change a local php.ini, which would take effect immediately. It however would normally only apply to the folder where the local php.ini is at. Is the script you are having problems with in the same folder where your php.ini is at?

  11. No one here is going to help you find where you mis-typed some characters in your code. That isn't learning, that's just you following along with something you saw.

     

    If you haven't read a basic php book or tutorial so that you know what the opening and closing {} mean, so that you can identify where they should be at in your code, you need to do that before you try to use a registration tutorial.

     

    Also, look at it this way, we have identified what the problem in the code is - missing/mis-matched {}. If you cannot take that information and fix up the code to correct that problem, you will not be able to write any code that does what you want.

  12. You need to store the date in a DATE data type with the YYYY-MM-DD format. The only time you should format as DD/MM/YYYY is when you want to display it.

     

    edit: damn, the forum's post notification (or lack of) gets a -20 likes.

  13. Your code is missing one or more closing } (that closes the else { on about line 100.) has a bunch of miss-matched opening and closing {}

     

    The error message you should be getting, which you didn't post so that someone here could more directly find the cause of the problem, concerns a syntax error/unexpected end of file, which is php's way of telling you that you have something that is not terminated by the time php reached the end of your code.

     

    A tutorial for a registration script assumes that you already know enough of the basic php language so that you are not lost on what the php code syntax is or what the code is doing and that you just want to see/learn what a registration script would look like. You need to learn the basics of the php language before you attempt to use it for something like a registration script.

  14. @jazzman1, I'm going to guess that the problems you found were due to copy/pasting the code, since the OP started other threads for a problem with the string he is building for the file_get_contents statement.

     

    Closing this thread since the next thread contains replies earlier than yours.

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