User Profile

Collapse

Profile Sidebar

Collapse
foss
foss
Last Activity: Jun 18 '10, 09:47 AM
Joined: Dec 26 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • copy file from a directory(outside webroot) to another directory

    hi all,
    I am not able to copy file from a directory in the server to another directory.
    Here,
    the source is outside the web root directory and the destination is inside the web root directory.

    I got a warning


    The code is as follows:
    Code:
    $destination="http://localhost/files/fileUploads/photo1.JPG";
    $source="http://localhost/files/../../fileUploads/photo1.JPG";
    ...
    See more | Go to post

  • foss
    replied to How to specify the directory to download files
    in PHP
    hi guys ,
    thanks for ur reply.

    I m still having problem . It would be great if you could edit this code
    Code:
    <?PHP
    mysql_connect('localhost','root','') or die("Unable to connect to SQL server");
    @mysql_select_db('test') or die("Unable to select database");
    $sqlimage = "SELECT * from pix "; 
    $sql_imgresult = mysql_query($sqlimage) or die (mysql_error());
    ...
    See more | Go to post

    Leave a comment:


  • foss
    started a topic How to specify the directory to download files
    in PHP

    How to specify the directory to download files

    hi,

    images are stored in MYSQL . What I need to do is to download the images from the database to some predefined directory in the webserver.
    I am hoping that someone could help me fixing it.

    Code:
    <?PHP
    //download.php
    mysql_connect('localhost','root','') or die("Unable to connect to SQL server");
    @mysql_select_db('test') or die("Unable to select database");
    ...
    See more | Go to post

  • foss
    started a topic display image from mysql(blob data)
    in PHP

    display image from mysql(blob data)

    HI all,
    I am able to upload the image as blob to mysql. but while displaying the image i cant display it properly .
    The code used for uploading image to mysql inserts data into mysql table.The uploading code is:
    Code:
    MYSQL_CONNECT("localhost","root","");
        mysql_select_db("sample");
    
        $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
    ...
    See more | Go to post

  • Thanks Andy for your reply

    :-)
    See more | Go to post

    Leave a comment:


  • sorry for disturbing . I got my mistake .
    The corrected code is:
    [HTML]<html>
    <head>
    <title>testin g</title>

    <script type="text/javascript">

    var counter = 0;

    function createTextField (name, id, parentEl) {
    if(navigator.us erAgent.toLower Case().indexOf( "msie") != -1) { isIE = true; } else { isIE = false; }

    ...
    See more | Go to post
    Last edited by acoder; Mar 14 '08, 11:11 AM. Reason: Added code tags

    Leave a comment:


  • problem with placing the dynamically created textbox

    I have got a Html form with a table.
    The table contains textfield and a button.
    When I click the button I want another textfiled to be created.
    (I have done till here)

    The problem is that I want the new textfield to be created in the same cell (within <TD> tag) where the first textfield is. I have tried to use <span> tag so as to force the new textfield to be created in the table cell. But I could not...
    See more | Go to post

  • foss
    replied to MySql database synchronization
    in PHP
    Here,
    Both databases(runni ng on different servers) can be updated independently, i.e. if changes (inserting data, deleting data, modifying data ..) are made in Database1 then the Database2 should be updated accordingly. Again, if changes are made in Database2 then the Database1 should be updated accordingly. This is to say that neither of the database is master or slave. Changes can occur independently in any database BUT this should be...
    See more | Go to post

    Leave a comment:


  • foss
    started a topic MySql database synchronization
    in PHP

    MySql database synchronization

    Hi all,
    My scenario goes like this:

    We have two Mysql Databases in different servers.
    The communication between these database servers is via low bandwidth internet (Again the internet may go down for some hours or some days).
    Both databases are having the same structure.
    We are not concerned to synchronize the database structure but we need to synchronize only the data stored in these databases. ...
    See more | Go to post

  • foss
    replied to validating a number entered in a textfield
    Sorry to disturb u friends .
    I got the solution to the problem . I has made some silly mistakes
    the solution is

    [HTML]<html>
    <head>
    <script type="text/javascript">


    function check_price()
    {
    // var price = document.form1. price;
    var value=document. getElementById( 'price').value;
    var indx=value.inde xOf('.');
    ...
    See more | Go to post
    Last edited by gits; Dec 27 '07, 08:39 AM. Reason: added code tags

    Leave a comment:


  • foss
    started a topic validating a number entered in a textfield

    validating a number entered in a textfield

    Hi friends,
    My form have a text field named "price" which should have only number and if it contains decimal number then it should not have more than two numbers after decimal. I tried this but it is not working . If the data entered is valid (as described above) then it should post to the target.php .....

    I hope u will point out my mistake OR u may advice some wise alternative for this ..
    thanks.....
    ...
    See more | Go to post
    Last edited by gits; Dec 27 '07, 08:38 AM. Reason: added code tags
No activity results to display
Show More
Working...