Jump to content

web_master

Members
  • Posts

    419
  • Joined

  • Last visited

Posts posted by web_master

  1. Hi,

     

    I got a problem, and I will try explain what I want on a simpliest way as I can.

     

    So, I got 3 tables.

     

    1. Group

    2. "Under" group

    3. Basic text

     

    Well, the "Group" table cols is looks (simplified) like this:

    ID

    GroupName

     

    The "UnderGroup" table cols is looks (simplified) like this:

    ID

    UnderGroupName

     

    The "BasicText" table cols is looks (simplified) like this:

    ID

    Txt_Group_ID

    Txt_UnderGroup_ID

    Txt

     

    I want to reload text to look like this:

     

    I. GROUP NAME

    - Undergroup

    1. txt

    2. txt

    3. txt

    ...

     

    II. GROUP NAME

    - Undergroup

    1. txt

    2. txt

    3. txt

    ...

     

    Uh, I hope it is understable...

     

    Thanx in advanced

     

    T

     

  2. Hi,

     

    I have a one question. I use the Tinymce, and when I put text into database there goes with the html tag's too. How can I reload the text without tag's?

     

    Text looks like this: <p style="color: #000">Text</p>

    I want this: Text

     

    thanx

  3. Hi,

     

    there is another problem with iconv()

     

    When I upload file on server with script:

     

    iconv('ISO-8859-1', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', $REQUESTHEAD['programs_month'], $REQUESTHEAD['programs_day'], $REQUESTHEAD['date_year'])));

     

    and list from database its work 2-3 refreshes, and after that there is an error message:

     

    Fatal error: Call to undefined function: iconv() in /home/...

     

    On my computer (server) its work fine... :(

     

    T

  4. Hi,

     

    I can't sleep tonight, because I want to solve this problem, so I find how can I do this:

     

    setlocale(LC_ALL, 'hungarian');
    echo (iconv('ISO-8859-2', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', '6', '18', '2010'))));

     

    or

     

    setlocale(LC_ALL, 'german');
    echo (iconv('ISO-8859-2', 'UTF-8', strftime('%Y. %B %d. (%A)', mktime('0', '0', '0', '6', '18', '2010'))));

     

    ...

     

    Daniel0 thank You, You're recommendations helps me to find how to do that - I hope that will help some other who have same problem.

     

    Best regards,

     

    T

     

  5. Hi,

     

    I'm reload from database the given year, month and day

     

    and its looks like this: date($REQUESTHEAD['date_year'] . '. ' . $REQUESTHEAD['programs_month'] . ' ' . $REQUESTHEAD['programs_day'] );

     

    after the print on screen is looks like this:  2011. 9 10

     

    How can I add the day-name too?

     

    Like (that date is on saturday): 2011. 9 10 (Saturday)

     

    BUT, I want that day-name on other language (german, hungarian... or other)

     

    Thanx

     

    T

  6. Hi,

     

    at first I am absolutely novice in Ajax, Ill never do nothing with Ajax, but maybe You can help me.

     

    program.jpg

     

    As You see on image this is an radio program, so I want to that "On Air" text changing dynamically if the server time is between begin and end time (time on left side).

     

    At first I reload from database (MySql) with php the date and time.

    - Date (at top) is stored separately in  database as columns Year, month and day.

    - Time is stored too in database as begin of time and the end of time.

     

    I want:

     

    - If the server date is equal with stored date and the server hour is between a two times (for example between 08-12) the On Air is lightning in that row

    - If the server hour is between 12-16, than the OnAir is ligtning in this row

     

    everithing WIHTOUT refreshing site.

     

    Oh, I hope You will understand What I want...

     

    Thanx in advanced

     

    T

     

    [attachment deleted by admin]

  7. Hi,

     

    on providers server I dont have a SMTP function when I want to send circular mail. So I need to use (with PhpMailer) simple mail() function.

     

    There is a problem because there is a mor than 4000 email addresses, so the session on server side is not open enough time to send all the mails. Is some possibility to solve this problem? My idea is that to close the session after every 300 mail, but I dont know how can I do that? :(

     

    T

  8. I think he means copying the actual php file out of a folder on one computer to another. Not through the net.

     

    Yes, not through the net, because this is an internal server - program is based on php

  9. How do you think anybody without access to your server will be able to get your script? If they use any requests over the web, all they will see is the generated HTML or other output that your script sends, not the actual code.

     

    Ken

     

    This an internal server, and You give me answer I think: that mean, only I can manipulate by the server computer, and if nobody have access to this computer, than nobody can copy html (php) files to another computer.

     

    Thank You, and sorry again for that simple question, but I had to ask.

     

    Best regards,

     

    T

  10. Hi,

     

    at first Im sorry if My question is looks like a question of begginner, but I must to ask:

     

    is some possibility to secure my php/html script to secure from copy from one computer to another?

     

    I made one php-program to one firm and I dont want to anyone copy to the other computer.

     

    Thanx,

     

    T

  11. why dont you convert case to lower on both side while firing query.. like:-

     

    lower(`data`) LIKE "' .strtolower(mysql_real_escape_string( $_POST['data'])) . '%"

     

    try it...

     

     

    phpchamps, You are great - Im a beginner and dont know so much about php programming... and also about mysql, and dont know what and where can I use.

     

    Thanks again!

     

    Best regards,

     

    Tivadar

  12. Hi,

     

    Ill try a both way that You say, but its dont work. In database I usual use the utf8 bin collation and even in connection I have a

    mysql_query( 'SET NAMES "utf8"' );

    mysql_query( 'SET CHARACTER SET utf8' );

     

    So, for a search in database I want to use the LIKE "' . $_POST['data'] . '%"', but in database store the strings with ucase and lcase too, and I dont know on wich way will user search the text. If put some text in search box with lcase but in database is text stored with ucase he wont find anything...

     

    T

  13. Hi,

     

    is this possible somehow:

     

    if string begin with uppercase use query:  ucase(`data`) LIKE "' . $_POST['data'] . '%"

    if string begin with lowecase use query:  lcase(`data`) LIKE "' . $_POST['data'] . '%"

     

    so I want to solve problem of ucase and lcase with php...

     

    Thnsx in advanced

     

    T

     

    Maybe ist more clearly

     

    if($_POST['data']) { // begin with ucase

    $Qery = 'ucase(`data`) LIKE "' . $_POST['data'] . '%"';

    }

    if($_POST['data']) { // begin with lcase

    $Qery = 'lcase(`data`) LIKE "' . $_POST['data'] . '%"';

    }

  14. Hi,

     

    is this possible somehow:

     

    if string begin with uppercase use query:  ucase(`data`) LIKE "' . $_POST['data'] . '%"

    if string begin with lowecase use query:  lcase(`data`) LIKE "' . $_POST['data'] . '%"

     

    so I want to solve problem of ucase and lcase with php...

     

    Thnsx in advanced

     

    T

  15. OK, as You see, the value of the submit buttons is a same, but I want to put a different values in database. The submit form have a Submit[1], Submit[2] and Submit[3] names. So how can I put value "1" or value "2" or value "3" put into database that looks like:

     

    when I submit <input type="submit" name="Submit[1]" value="SEND" /> the value in database need to be 1,

    when I submit <input type="submit" name="Submit[2]" value="SEND" /> the value in database need to be 2,

    when I submit <input type="submit" name="Submit[3]" value="SEND" /> the value in database need to be 3

     

    I hope its clearly...

  16. Hi,

     

    I got in one form 3 submit button, How can I put in database different values for a different Submit:

     

    Submit[1] - value 1

    Submit[2] - value 2

    Submit[3] - value 3

     

     

    <form...

    <input type="submit" name="Submit[1]" value="SEND" />

    <input type="submit" name="Submit[2]" value="SEND" />

    <input type="submit" name="Submit[3]" value="SEND" />

    .../form>

     

    if($_POST['Submit']) {
    $Query = mysql_query( 'INSERT INTO `table` (`Submit`) VALUES ("' . $_POST['Submit'] . '",)' );
    }
    ?>
    

     

    I got problem with Array... :(

     

    Thnx in advanced

  17. There is no simple method for doing this with a single pattern, this is not really what Regex is designed for. The easiest option would be to use an array of patterns/replacements. Since the pattern and replacement are fixed however you might be as well to simple use str_replace with an array of patterns and replacements.

     

    So, this is the problem, that I dont know how can I do that - Ill try the simple str_replace ... but it dont work, but I don't know how can I do that with array ... :(

  18. I'm not sure what you mean? Can we have an example input with expected output?

     

    Ok, here is an examlpe text:

     

    Ôszintén mondom, mûködik.

     

    And need to looks like this after change characters:

     

    Őszintén mondom, működik.

     

  19. Hi,

     

    I got in database table CATEGORY and table PRICE

     

    CREATE TABLE `price_cat` (

    `price_cat_id` INT(3) UNSIGNED NOT NULL AUTO_INCREMENT,

    `price_cat_name` VARCHAR(255) NOT NULL DEFAULT '',

    PRIMARY KEY (`price_cat_id`)

    )

    ENGINE=MyISAM

    ROW_FORMAT=DEFAULT

     

    ---------------------------------------------------

     

    CREATE TABLE `price` (

    `price_id` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,

    `price_pricecat` INT(6) UNSIGNED NULL DEFAULT NULL, [here comes the category ID the price_cat_id]

    `price_name` VARCHAR(255) NOT NULL DEFAULT '',

    `price` FLOAT NOT NULL DEFAULT '0',

    PRIMARY KEY (`price_id`)

    )

    ENGINE=MyISAM

    ROW_FORMAT=DEFAULT

     

    How can I do the query to get like this:

     

    <!-- queri begin

    TV [this is the category from 'price_cat' table]

    Chinese TV-s 100 dollar [these are from 'price' table]

    English TV-s 100 dollar

    Hungarian TV-s 100 dollar

     

    RADIO

    Chinese radio 100 dollar

    Russian radio 100 dollar

    Japanese radio 100 dollar

    query end -->

     

    Thanx in advanced

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