Jump to content

Dathremar

Members
  • Posts

    169
  • Joined

  • Last visited

Posts posted by Dathremar

  1. I think that the problem is the path. So make a double check on what goes into the unlink command and always use the file_exists command with unlink, that will solve some unnecessary head aches ;) cheers

  2. OK this is just a thought...

     

    How about making a table for this temporary data u need to collect from the page. So make a row in the table for the log in user and update it whenever the user makes a change. And check this row information on your other site ... and at the end when the user logs off , delete this row.

     

    Hope I gave you some idea :)

  3. I think you should make an ajax script that check the value of the variable on certain period of time (couple of seconds or something).

     

    And one more thing, if you access the variable from both pages keep in mind that the variable may be overwritten, you got to think this really nice ;)

  4. I am not sure if i am getting the question right.

     

    But if you want to make something to change while you select an option you can list the options available in a list box and make a simple java script for the onChange event.

     

    If you need something like that tell me, i am willing to hlp.

     

    cheers

  5. Thx for the info .. didnt know that. This same thing worked on my local server but when i uploaded on my online server i got the errors. Now i made different variables for the path of the images and for the path used by the php code (relative path) and all turn out good.

     

    Again thx for the info ;)

  6. Funny thing is that i use in the php code commands like:

     

    $logo_on_size  = round((filesize($path.$db_3->row('logo_on')))/1024, 2);

    and

    $img = @imagecreatefromgif($path.$db_3->row('logo_on'));

     

    $path variable is the relative path to the pictures folder and i keep the name of the pic in the database.

     

    and that gives me correct values, but the picture doesnt show ... I am confused :(

     

     

  7. But that doesn't work  ???

     

    tried that already and i tried adding a picture on the page which is within the domain2 and that worked with no prob... but when i try to add a picture which is located under the domain1 then i have problem ... Any ideas?

     

  8. Not sure if this is the right place to post this but here it goes...

     

    I have 1 domain to the web site and another domain thats 1 folder deeper in the directory tree.

     

    Example.

     

    domain1

        pictures

        pages

        domain2

     

    Now, when I log in on the domain2 (admin pages) and I have a page there for administrating pictures which are in the folder pictures. I get on the page only blank spaces where the pictures should be (usually a path problem). I recently transfered to linux server so maybe it is something related to this?

     

    I am using this path:

     

    ../../pictures/picture.name

     

    Already checked the uper/lower case of the names it is not that ...

     

    Thx for your time

  9. Once again I need your help guys and girls.

     

    I was wandering if there is a way to call a javascript confirm popup within a php code and use that confirmation info (yes/no-> true/false w/e) to continue with the php functions.

     

    Example

     

    if ($variable == 0)

    {

      call confirm;

              if (yes)

              {

              some code;

              }

    }

     

    Thanks in advance

  10. I am drawing a pie chart on my web site. the function and everything works well on windows server (my local server), but on the linux on-line test server it doesnt. I located the problem in this -> imagettftext($image, 10, 0, $text_X, $text_Y, $text_color, $font, "$text"); where $font = "Verdana.ttf"; The problem is something about the font because  if i comment this line the picture is displayed just fine. Any suggestions  about what could be the solution of this matter?

     

    Thx in advance

  11. Your Charset in MySQL needs to be binary (not latin1 or whatever).

     

    "Binary" is not a character set--can you clarify?

     

    Ok, I checked the table settings and the Character set is ISO 8859-1 Western Europe, as far as I can see the input is made manually into the variable $name (this is a page for testing the language and inserting information about the language) and when you load the page it does the insertion.

     

    So after I input here the text in the variable (dunno how to use that kind of chars) this code inserts it into the languages table.

  12. Maybe the topic isn't clear enough about my problem but i didn't know how to phrase it....

     

    So I will try to be as much informative as i can. The thing is that i want to insert into a languages table the id (which is a short name of the language , in my matter it is BG - Bulgarian) the name of the language (Bulgarian but with utf8 encoding which means the display of it to be on bulgarian font) ....

     

    The php code that some one made before me (and works fine for ut8 - macedonian language) is:

            name = 'Ìàêåäîíñêè'; --> Here is my problem, need to write the Bulgarian word here in this kind of writing ????? so it would be inserted correctly in MySql

    $name = convert_charset("$name", "windows-1251", "UTF-8"); --> this is function that calls the iconv lib function from php

     

     

    $string = "UPDATE languages

      SET name = '$name'

    WHERE language_id = 'MK'";

    $db_chat->query($string);

     

    Dunno if i am clear enough , so if you need some more info please ask. thanks in advance

  13. Ok here is the definition of the input boxes:

     

    <input name="myfile" type="file" class="text11_crn_bold" id="myfile" size=20>

     

    <input name="myfile1" type="file" class="text11_crn_bold" id="myfile1" size=20>

     

    And i am doing a checking if they are empty or not after submitting:

     

    if (trim($myfile) == "")

    {

    if (trim($myfile1) == "")

    {

    do something if both empty

    }

    else

    $error_msg = ERR_logo;

    }

    else

    {

    if ($myfile1 == "")

    $error_msg = ERR_logo;

    else

    {

    do something else if both full

    }

    }

    }

     

        So the thing is that it is always considering that the variables $mfile and $myfile1 are full and goes to the part to do something if both full no matter if i leave the input boxes empty or not. I used echo to view the value of the variable and it displayed  Array on the on line server and like I said on my local server and test server it is working fine. If you have more q about this tell me. Thx for trying to help.

  14. After searching the web and not finding anything like this I decided to post my problem here, I hope some1 can help...

     

    I made an upload page with 2 input fields. It works perfectly on local machine and on test server, BUT it does not work on the live server.

    I used echo $myfile and echo $myfile1 (names of the input fields) to get the value of the variable after the submit and on the local server and test server I get empty variable (ofc when i leave the fileds empty) and when I leave the fields empty and submit the form on the live server I get the value Array in both of the variables.........

     

    I really don't know why is this happening.. Is it something about versions of php, OS or something like that .... Everything i read so far says that input type=field CAN'T have default value ......

     

    Maybe it is a newb question, but if some1 knows any info about this plz answer

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