Jump to content

RealDrift

Members
  • Posts

    158
  • Joined

  • Last visited

    Never

Everything 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. thanks for your help, i have already arranged the script like you have mentioned. the mysql gets updated in the beginning of the script and then i fetch the word from the db.
  3. i need help on this, if anyone could
  4. 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
  5. the in.css is in the correct folder and surprisingly enough the inline style doesn't work.
  6. I have done as you suggested but the echoed sentence is still not what the css says it should be.
  7. 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
  8. 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
  9. no not the current time but pulled from the database. each row in table has different times.
  10. 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.
  11. 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
  12. 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
  13. Hi, i have been googling the xmlhttprequest function and i found this tutorial: http://www.openhosting.co.uk/articles/webdev/5899/ at the end of that tutorial it shows how i can click a link and display new info. Is there any way I dnt have to click a link and still be able to pull info from a php file and not a .txt one? please could somebody help me with this. thanks
  14. please could someone assist me, i dont have any idea as to how i shud fix this. i thought an if elseif statement cud give me the results but it dsnt, anyone able to even make a wild guess?
  15. 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?
  16. could someone help me with this please?
  17. thanks barand for that but how do i incorporate it into the table script i have?
  18. 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 ???
  19. 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
  20. i am an itermediat php/mysql user i just wanted to know how i could achieve this. I already have everything i.e. database etc just need to look into css cursor property
  21. hopefully someone will come to a solution. i am googling aswell but no luck for any answers
×
×
  • 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.