Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 729179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:46:03+00:00 2026-05-14T06:46:03+00:00

I have an image uploading script in which i use the following setup to

  • 0

I have an image uploading script in which i use the following setup to assign names to uploaded images;

        $saltdate = date( 'U' );
        $saltuser = $_SERVER[REMOTE_ADDR];
        $saltname = md5($saltdate.$saltuser);

// Recieve, Process, Save uploaded image

// Update database with image name

The problem that i encounter is that after processing/saving the image, when its time to add this file name to the database, the value of $saltdate seems to have changed and i will get a file name in the database that doesnt exist.

EDIT

The value has changed in that the time increases from when i name the file to when i store the name in the DB.

How can i make sure that the value doesn’t change once i establish it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:46:04+00:00Added an answer on May 14, 2026 at 6:46 am

    This is the kind of error where a debugger comes in really handy. You can set a breakpoint in your code and then execute it step by step and inspect the state of variables et al.

    You can use XDebug as the server-side php module and e.g. netbeans as a frontend/ide.
    There’s a short introduction for this combination at http://netbeans.org/kb/docs/php/debugging.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a WCF service for uploading images , which accepts System.IO.Stream as
the procedure: i have a script which uploads images (via hmtl-form and php) for
I have a php script which uploads images to a temporary folder on the
I have a php-script, which uploads mp3-files on my server. I use 'uploadify' for
I have the following code for uploading images, when I tried to upload jpg
I have setup uploadify which works fine on Firefox with mulitple image uploads. However,
I have an ASPX page where I am uploading an image to server for
I have a classifieds website with a picture script for uploading pics onto the
I have been creating an image uploading site for a while now but have
I have had problems with a simple php script in which I can upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.