Jump to content

RealDrift

Members
  • Posts

    158
  • Joined

  • Last visited

    Never

Posts posted by RealDrift

  1. shouldn't the word be updated after the user presses submit? I mean the submit button reloads the script which runs all the code again meaning the word is fetched from the db again which should be updated and hence the new word should show?

  2. Hi,

     

    Basically I have a table displaying a simple word in a table. this word is pulled from a mysql table.

     

    Below this I have a textbox where you can type in a new word and then click submit, which updates the sql table.

     

    When the submit button is pressed and the old word is replaced by the new one in the table a message is echoed stating so.

     

    When this is echoed I want the table to show the new word that just replaced the old one. Currently the message is echoed and the table shows the old word. I have to manualy refresh the page and then the new word is shown in the table.

     

    Any help will be appreciated, I just can't seem to find an answer.

     

    Thanks a lot

  3. Thanks for the quick reply, I gotta go to bed now - its 2:46am here and i gotta get an early start lol

     

    I'll test your method tommorow. I wanted to know if everytime I want to use css font rules in a php echo I have to put them in <body> tags and such? or is there another simpler way?

     

     

    Thanks

  4. Hi,

     

    I want to echo the following but want the font to adhere to the css rules I have defined in a file called in.css

     

    Here is the echo:

     

    echo "<span class=\"output.reward\">You Donated!</span>";

     

    Before this echo I put the following line to include the css file:

     

    echo "<link rel=stylesheet href=includes/in.css type=text/css>";

     

    the css thing is called output.reward and is in the in.css file like so:

     

    output.reward  {  
      font-size: 10px;  
    font-family: Verdana;
      color: #FFCC00;
    
    }

     

    The problem is the echoed font is not what the css rule is defined as.

     

    Any help would be good.

     

    Thanks

  5. Hi,

     

    here is the code:

     

    //Display the row of data

        $output .= "<tr bgcolor=\"$bgcolor\">\n";

        $output .= "<td>".$row['Receiver']."</td>\n";

        $output .= "<td>".$row['Amount']."</td>\n";

        $date_show        = date('d/m/Y h:i:s a', strtotime($row['Date']));

        $date_compare    = date('d/m/Y', strtotime($row['Date']));

        $date_today      = date('d/m/Y');

        $date_yesterday  = date('d/m/Y', strtotime("-1 day"));

        if ($date_compare == $date_today) {

    $output .= "<td>'Today'</td>\n";

    //        echo 'Today';

        }else if ($date_compare == $date_yesterday) {

    $output .= "<td>'Yesterday'</td>\n";

    //        echo 'Yesterday';

        }else {

    $output .= "<td>".$date_show."</td>\n";

        };

        $output .= "</tr>\n";

     

    I want to echo the time next to the word 'Today' and 'Yesterday' in the $output's.

     

    thanks.

  6. Hey,

     

    I have a form with a submit button. when i click submit i get an echo, which is a simple sentence.

    however this doesn't echo on a new page but on top of the form

     

    is there anyway to get it to echo on a seperate page? just the echo's sentence in the middle of a new page?

     

    Thanks

  7. Hey,

     

    I just wanted to know what kind of legal documents would a freelance php coder sign to make sure he/she finishes the work correctly, hands over all the code to you, never re-sells the code and doesn't tell other people about your project?

     

    I want to develop a commercial website and needed info on this. There must be proper legal methods which allow places website owners to hire coders and not have to worry about them leaking code and project info to others?

     

    any help will be greatly appreciated.

     

    Thanks

  8. Hi,

     

    I am looking to get some work done. I want a script written in Ajax and php/mysql. On my website I want a script to tell the user how many new messages they have if any, and if there are none then I want the script to just say something like "no new messages".

     

    The reason I want to use Ajax is because it will update the message status without refreshing the whole page or something annoying like that. Please let me know your price for this. I understand this is a small job, but i have others jobs aswell which I need help with in the coming weeks.

     

    Please let me know asap.

     

    Thanks

  9. Hi,

     

    i posted a question in the php help forum but i got no response, i am willing to pay someone to fix the problem for me, the task shud be very easy for someone who is fluent with with PHP. Below is the link to the thread, so please look at the problem and let me know how much you would charge to help me fix the problem:

     

    http://www.phpfreaks.com/forums/index.php/topic,203537.0.html

     

    you can PM me on here with your prices, and please no mucking around

  10. Thankyou Siwelis for incorporating the original code in the pseudo code, i am not too good with understanding how that kinda coding works.

     

    however i have a problem, the dates in the table show up but the words "Today" and "yesterday" are not shown.

     

    any ideas as to why?

  11. i tried the second script you gave me, it doesn't give me ay errors but it dsnt display the dates in the table anymore, it just echoes them in a line at the top of the page.

     

    and it dsnt substitute the date for the words "Today" and "Yesterday"

     

    also the date and time are stored int he database as a timestamp witht he standard format

     

    ???

  12. Hi,

     

    I have a script which displays the date a transaction ocurred in rows, currently it only displays the date and time, what i want it to do:

     

    - if the current day is the same as the transaction date then i want it to echo the word "Today" plus the time instead of the date and time

    - If the transaction happened yesterday i want it to echo the word "yesterday" and time instead of the date and time

    - if the date is two days before the current date then it shud only display the standard date and time

     

    I found a generic script for this:

     

    <?
    $today = date(”m.d.Y”);
    $yesterday = date(”m.d.Y”, strtotime(”-1 day”));
    $mtdate = “<$MTEntryDate format=”%m.%d.%Y”$>”;
    
    if ($mtdate==$today) {
    echo “Today”;
    }
    elseif ($mtdate==$yesterday) {
    echo “Yesterday”;
    }
    else {
    echo(”<$MTEntryDate format=”%A”$>”);
    }
    ?>

     

    i dnt know how to incorporate it into this script i have:

     

    //Display the row of data
        $output .= "<tr bgcolor=\"$bgcolor\">\n";
        $output .= "<td>".$row['Receiver']."</td>\n";
        $output .= "<td>".$row['Amount']."</td>\n";
        $output .= "<td>".date('d/F/Y h:i:s a', strtotime($row['Date']))."</td>\n";
        $output .= "</tr>\n"; 

     

    if somebody cud help me out i would really would appreciate it.

     

    Thanks

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