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 8394729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:07:58+00:00 2026-06-09T20:07:58+00:00

Help Needed Issue facing : Getting refreshed automatically without submitting anything.. in php while

  • 0

Help Needed
Issue facing : Getting refreshed automatically without submitting anything.. in php while coming from other page? Tools used: php, html and mysql.

    <?php
            session_start();
            ob_start();
            include('connect.php');
            include('functions.php');
            $uid = $_SESSION['user'];
            ?>
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>Nikon</title>
            </head>

            <body>
        <div id="wecome" style=" margin-top: 120px; margin-left: 660px; margin-right: 20px;">
                <div id="register_detail" style=" margin-top: 35px; margin-left: 30px;">
                  <?php
                  $image=$_POST['image'];
                  $image1=$_POST['image1'];
                 //$comments=$_POST['comments'];
                  $image=($_FILES['image']['name']);
                  $image1=($_FILES['image1']['name']);

                 //This is the directory where images will be saved
                  $target = "images/uploaded/";
                  $targetx = $target . basename( $_FILES['image']['name']);
                  //Writes the photo to the server
                  if(move_uploaded_file($_FILES['image']['tmp_name'], $targetx))
                  {

                  //Tells you if its all ok
                  }
                  else {
                 //Gives and error if its not
                  }

                 $targetx = $target . basename( $_FILES['image1']['name']);

                 //Writes the photo to the server
                 if(move_uploaded_file($_FILES['image1']['tmp_name'], $targetx))
                 {

                 //Tells you if its all ok
                 }
                 else {
                //Gives and error if its not
                 }
                 if (!$targetx) 
                {
                ///echo '<h1>Copy unsuccessfull!</h1>';
                $errors=1;
                }
                //If no errors registred, print the success message
                    $uid = $_SESSION['user'];
 $sql = "update dealer set image = '$image' ,image1 = '$image1' where id = '$uid'";
                    $result = mysql_query($sql);
                    $success =2;
                  ?>
            <?php
                if($success==2)
                {
            echo '<meta http-equiv="refresh" content="1; url=thank_u.php">';    
                }
                ?><div id="option1" style="width: 354px; height: 185px;">
                    <img src="images/option_big2.jpg" border="0px" /><br/><br/>
                 </div>
                  <form enctype="multipart/form-data"  action="option_2.php" method="post">
      <div id="option3" style="width: 350px; height: 55px; margin-left: 380px;">
      <font style="font-size:12px; color:#666666;">Image 1</font>&nbsp;&nbsp;
      <input type="file" id="image" name="image"><br /><br />
      <font style="font-size:12px; color:#666666;">Image 2</font>&nbsp;&nbsp;
      <input type="file" id="image1" name="image1"><br/>
      <div id="font" style="margin-top: 4px;">
      <font style="font-size:12px;color:#666666;">( jpg, gif, png files only )</font></div>
                  </div><br/><br/>
       <div id="submit" style="margin-top: 10px; text-align:right; margin-right: 110px;">
       <input type= "hidden" name="test" value="2"><input type="submit" value ="Submit">
                  </div>
                  </form>
                  </div>

               </th>
              </tr>

            </table>
            </body>
            </html>

 Please help me in solving it urgently...  
  • 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-06-09T20:07:59+00:00Added an answer on June 9, 2026 at 8:07 pm

    you have assigned $success =2 directly. Assign it after uploading the content. i mean something like

    if(move_uploaded_file() == TRUE)
    {
        $success=2;
    }
    

    And don’t use “refresh” in <meta>. You want to redirect the user after form submission,right! then why don’t you use header: or redirect?

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

Sidebar

Related Questions

Here is my issue from the beginning...I really need someones help.... I needed to
Beginner help needed :) I am doign an example form a php book which
i needed help. How do i get domain from a string? For example: Hi
I need help with this issue. I'm trying to install php in my netbeans
Help needed. Im writing a function that returns result of ajax call but i
Help needed.. I have a organization layout which have rectangular shapes not in an
Help needed! I have 10 different .png files and i want to display them
Some MATLAB help needed ! I have an set of 1s and 0s, I
Custom string format to xml help needed. Java and C#. [Node(X)][CHILD0(Y)][OBJECT1(A)][Key1(1)][Key2(2)] [Node(X)][CHILD0(Y)][OBJECT1(B)][Key1(1)][Key2(2)][Key3(3)] [Node(X)][CHILD0(Y)][OBJECT1(C)][Key1(4)] [Node(X)][CHILD0(Y)][OBJECT2(A)][Key1(1)][Key2(2)][Key3(3)]
First steps in FreeBSD: trying to run my installation script. Fast help needed: #

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.