Jump to content

4bdulmobeen

New Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by 4bdulmobeen

  1. Hello, I am facing problems of trying to insert exploded values into the database.

     

    I always get this 000 0000-00-00 00:00:000 format

     

    For example I type 100 2000-10-02 06:00:10 6 in the three textboxes,

     

    100 -> textbox 1

    2000-10-02 06:00:10 -> textbox 2

    6 -> textbox 3

     

    it still remain the same 000 0000-00-00 00:00:000.

     

    I want to get this data 100|2000-10-02 06:00:10|6 in sql database.

     

    Can anyone how make it to work?

     

    you should use serialize() function to insert it into the database... when u get it back from db..use unserialize() function..

    Hope it'll help u..

  2. :bash: we can upload file to server through move_uploaded_file function of php

     

     

    <html>

    <head>

     

    <title>Untitled Document</title>

    </head>

     

    <body>

     

    <!--

    hi there!

    you can upload the file to the server using move_uploaded_file() function...

     

    consider u have the form like this:

     

    -->

    <div align="center" >

    <h2>Welcome To Our Site</h2>

    <p>Lets upload a file for testing purposes</p>

     

     

    <form action="uploadFile.php" method="post" enctype="multipart/form-data" >

     

    <input type="file" name="profileImage" /><br>

     

     

    <input type="submit" value="Upload File" /><br>

     

     

    </form>

     

    </div>

    <!--

     

    when u'll click on the Upload File button then the script i.e uploadFile.php specified in action attribute of the above form will perform the task to move the uploaded file to the server...

     

    here the code for uploadFile.php

     

    $fileName = $_FILES['profileImage']['name']

     

    which is original name of file.

     

    $path="C:uploadFiles/images/".$fileName;

     

    which is the path where i want to place the uploaded file.

     

    move_uploaded_file($_FILES['profileImage']['tmp_name'],$path);

     

    here $_FILES['profileImage']['tmp_name'] is the temperory file uploaded on the server.. we wana move it from the that location to our own specified directory/folder...

     

    so the function move_uploaded_file() moves the file to the path specified

     

    -->

     

     

     

    </body>

    </html>

×
×
  • Create New...