Working With Dates On The Modify Page
I have a column in a table called testimonialDate. It is of type 'date'. When trying to modify a record, I can get it to display nicely on the modify page using:
$testDate = $testrow['testimonialDate'];
$testDate2 = strtotime($testDate);
$newdate=date("m-d-Y", $testDate2);
then <?=$newdate?>
However, when I change the displayed date and hit the modify button, it blanks out the testimonialDate column in the record selected.
I've found a lot of hints on the internet for displaying, but how do I send the info back up?
I'm also having issues trying to add a record. Typing in 3-3-2003 in text field results in 2003-3-20 in database.
Can I get some hints or a link to a good tutorial?
View Complete Forum Thread with Replies
Related Forum Messages:
Working With 2 Dates
Two tables...debits and credits date field in each with dateTime format. I need to select all rows where user='$userID' and then print them to screen in a chronological order.
View Replies !
Working With Dates
I'm wanting to return all the data from my database for an exact date. My date field is a timestamp. Here is the code that I have been trying to use: select * from production where date like 񟭇-05-30' or select * from production where date = 񟭇-05-30'
View Replies !
Working With Dates In Hours Minutes Seconds ?
I have 2 dates in this format $timeold = date('m.d.y H:i:s', $timeold); $time2=(strtotime("now")); $time2 = date('m.d.y H:i:s', $time2); for example $timeold is 09.21.06 08:50:30 and $time2 is 09.21.06 09:00:38 When I make this $diff= $time2-$timeold; I receive this -608.21000003815 how can I transform this value (-608.21000003815) in hours minutes seconds ?
View Replies !
Working With Dates - Set Up A Cron Job That Will Close All Auctions That Are 10 Days Old
I am writing a new auction script for my website and I have everything working except closing the auctions. I have the database set up to record the start time like this: Field    Type     Default time    datetime   0000-00-00 00:00:00 I want to set up a cron job that will close all auctions that are 10 days old. My only problem is I don't know how to write the code the find the 10 day cutoff. I know I need to somehow take today's day and subtract 10 days from it but I can't seem to find out how. My plan is once I find that code I will then take that variable and compare it to the time in the database with >.
View Replies !
Redirecting The Page - Cannot Modify Header Information
I have one doubt regarding redirecting the page.. If I run the redirect code that is header("Location: www.sampels.com") in the local server it works well but If I upload the same PHP file to the web server It gives warning and didnt work. Warning: Cannot modify header information - headers already sent by (output started at /usr/local/etc/httpd/htdocs/project/index.php:7) in /usr/local/etc/httpd/htdocs/prjoect/index.php on line 108 what can I do to do solve this problem.. please can anyone help me.
View Replies !
Cannot Modify Header - Html Page With A Form
my code was working fine yesterday. I have a html page with a form and a php page that plugs the posted fields into a .rtf file. All of a sudden i get this error: Warning: Cannot modify header information - headers already sent by (output started at.
View Replies !
Modify Header Information - ADMIN PAGE
I am working on an ADMIN PAGE of my website. When I transferred hosting service, the admin page no longer work properly. The following error usually appears on almost every page. what does it mean? why most of my pages is not working properly? The error message appears like this: Warning: Cannot modify header information - headers already sent by (output started at /home/q/public_html/admin/cn.php:2
View Replies !
Working With Dates - Runs And Queries The Database To Produce A List Of Information
I have a script that runs and queries the database to produce a list of information, based on a date range. This is to fllow up on a script that is automatically run each Sunday night. What I want to try and acheive is, for example, if someone manually runs this report on a Tuesday the script will assume that it is run on the Sunday night, to make sure the results are exactly the same as the emails that have gone out. PHP Code:
View Replies !
Page Redirection - Warning: Cannot Modify Header Information Headers Already Sent
Warning: cannot modify header information headers already sent( at start of D:search.php: 108) in d:search_play.php on line 242.i suggest a way I redirect or be automatically sent to a nother page without using header()? HTML Code: //search.php is the html form <form action="<php echo $SERVER['PHP_SELF'];?>" method = "post"> <!--line 108--> PHP Code: <? //search_play.php process and display results header("Location:../user_info.php"); //line 242 ?>
View Replies !
Create A Pop-up (on Page Load) On Certain Dates
I'm new to PHP, and i want to create a pop-up (on page load) on certain dates.. What i have is the script for the pop-up: <body scroll="auto" <?php $today =date("d-F"); if ($today==$datum) {echo "onLoad=".$g_birthday_pop;}?>> The pop-script = $g_birthday_pop = <<<EOT "MM_openBrWindow('http://www.nu.nl','popup','width=300,height=300')" EOT; $datum is in another file (include/datum.php): <?php $datum= "30-December"; ?> And this works if the date is 30th of December, but i want it too on other dates that you put in $datum Something like: <?php $datum= "30-December";"10-March"; ?> So i want to control the pop-up just by editing the "datum.php"-file
View Replies !
Offering Dates And Booked Dates In A Table As DATE Datatype Using MYSQL.
Availability dates in offering dates except booked dates. For Example: Offering dates are : 01-09-2005 to 27-09-2005 01-11-2005 to 30-11-2005 Booked dates are : 10-09-2005 to 23-09-2005 Availability dates should be 01-09-2005 to 09-09-2005 24-09-2005 to 27-09-2005 01-11-2005 to 30-11-2005 I am storing offering dates and booked dates in a table as DATE datatype using MYSQL. So, I want the above mentioned availability dates as a result.
View Replies !
Two PHP Scripts On One Page Not Working?
I have two small PHP scripts running on a test page Both scripts work perfectly when there is one script on a page. However, if I place two on the page (one above the other), the second script will not render. I get no PHP error messages - the script will just not render. I think the PHP Scripts are OK as they were automatically generated by RSS Feed Burner and both do run separately. There may be an issue with having separate calls of some kind on the page or my server might not be set right. I did a server test that I think shows that it is OK but I am not sure. The only think I have in my htaccess file for PHP is: "AddType application/x-httpd-php .htm .html" . I am new to PHP and was wondering if anyone can see why both scripts will not run together?
View Replies !
Calendar Page Not Working (in IE)
I have been hard at work on this one and my computer broke so I haven't been able to resolve this problem for a bit, I open the webpage in IE and it doesn't show up but in FF it shows up just fine, anyone able to give me a hand on this one, it was working fine awhile back but now for some reason it seems to have broken. Code:
View Replies !
Flash Not Working On Page
I have inserted Flash animation on my page as normal (using Dreamweaver)- only it won't display in the browser for this site - which has various php/mysql pages on it - but this one is a simple html page - which displays the html - but not the Flash ? The flash displays in the browser if I insert it into a page on another site - which does not use php/mysql. Is it to do with the set up of the site which uses php/mysql ? - e.g. the fact there's testing server settings. My sites/servers are hosted remotely - and not on my own machines.
View Replies !
Login Page Not Working
I have a database installed that can accept a csv file. when I installed onto a new server, it wont upload. is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server. just reloads the page again when submitting the user and pass Code:
View Replies !
Get Two Dropdown Lists Working On A Page
i am trying to get two dropdown lists working on a page. How do i go about this. For example, I have 1 table which holds countries and cities. When a user selects a country in the first dropdown list, i'd like the second dropdownlist populate with a list of cities etc. from my database.
View Replies !
$HTTP_REFERER Not Working On Index Page
I'm using $HTTP_REFERER in various parts of my site and it works well. When I use $HTTP_REFERER on my index page to see where members are coming from before they log into my site it won't work. Perhaps this has something to do with the previous page being from an outside site?
View Replies !
Showing "Today" "Yesterday" Working Dates
I've got a date field in mysql... i call it to my script using: echo date('m/d/Y @ g:i:s A',strtotime($row["newsDATE"])); where $row["newsDATE"] is the untouched mysql time stamp... what I'd like todo is be able to say: Today @ Time Yesterday @ Time 2 Days Ago @ Time Date @ Time as my posts age..
View Replies !
Drop Down Based On First, Working, But How Do I Keep The Value If Page Reloaded?
I have a drop down list that is populated via MySQL. Once an item is selected a second drop down appears, again populated by MySQL. I know how to keep the value for the first drop down, if the page is reloaded.... but the second one is where I am having the issue. Is it possible to have a page reload and echo not only the first dropdown value, but also the second within the <select> tags?
View Replies !
Dates In Range Falling Between Existing Dates
The latest quandry I have is that I need to: a: check whether any dates in a date range entered by a client in a form (datefrom, dateto) conflict with any existing date ranges already in the database. -this is a check to see whether the dates that a customer is trying to book are not already booked- Obviously its easy to get the numbers out of the database (i.e. 28/12/2006 or whatever format) and from the form but how to I convert this 'range' actually into a range I can loop through that will return true if any of the dates are the same (i.e. already booked)? b: is similar in that I want to check how many of the clients entered dates fall into the pre assigned high, mid and low season ranges in the database and multiply each of those days by the corresponding price.
View Replies !
Php Code Embedded Inside Html Page Not Working.
How do I make or workaround in my Apache server to parse *.html files for <?php ?> code embedded in it? Currently php recognises <?php ?> tag only if the file has a *.php extension. Any php code inside *.html or *.htm is ignored. Since I dont have admin access to the server or admin person, changing the php configuration is out of choice. Now I have to go thru echo and print statemnets to get it work. But it looks very cumbersome and prone to errors.
View Replies !
Changed Page From .htm To And My Drop Down Menu Stoped Working
I have been building a rottweiler site for a friend. I just installed "The Search Engine Project" so I need to change one of my pages from .htm to .php so I can integrate the search results window into my layout. But, whenever I change the page from .htm to .php my menu, a project 7 css drop down menu, stoppes working. Why is this? Code:
View Replies !
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore... i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working... and i have no clue where to find the error... it just keeps showing the first page...
View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this: <?php session_start(); session_unregister($SESSION); session_destroy(); unset($SESSION);?> In each page I have this other script #accesscontrol.php <? session_start(); if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo { #Maybe I use after. } else {echo "<h1>Sorry...</h1>"; echo "<A href = "index.php"><H4> Login Univernet</H4> </A>"; session_destroy(); exit;}?> The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.
View Replies !
Get Dates Between Two Dates, Then Add To Table
I've got a form that inserts data into a database. Basically what it sends is a sets of dates. What I'm wanting is another set of inputs that also sends some dates. But before it adds them to the database I want to query the dates and find all of the dates between the two given ones and add them to the database as well. Code:
View Replies !
How To Modify CSS With PHP?
Is it possible to modify the background-image for a certain web page with PHP? I'd like to but a few buttons on the top of a page so readers can select from 2 or 3 different background images (or colors) to make the page easier to read. Can I do this kind of Dynamic HTML without using JavaScript? How do I modify my CSS? Or do I just point the page to a different stylesheet just for the background-image directive?
View Replies !
How Do I Modify Php.ini?
I have just purchased a new server and am using Plesk. I need to enable magic_quotes_gpc but I'm not sure how to get to the php.ini file? Would I find it from within my Plesk control panel?
View Replies !
Can't Modify Php.ini
I want to modify the register_globals value in my php.ini.. but find prob... I have two php.ini (could you explain this too ), in windows folder (c and in php folder. I don't know which one to modify..? recently.. I tried to modify both of them (tested it one by one offcourse).I looked for register_globals and changed the value to 'off' and save it. Then i ran php_info(); but the value didn't change there... still on.
View Replies !
Modify
I need to make a change to the following change from this hotels/?page=2 to hotels/1.html This is more than i have learned yet <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(.*)detailed/listing([0-9]+).html $1detailed/listing.php?link_id=$2 RewriteRule search_(.*).html search.php?$1 RewriteRule ^(.*)page([0-9]*).html $1index.php?page=$2 RewriteRule ^(.*)index.html $1index.php </IfModule>
View Replies !
Modify Array
What I want is that if that array has less than 5 elements, then it should add the number of elements required to make it 5, and the value of those elements should be 0.
View Replies !
How To Modify A Quote
I quoted a price for a client to do a php database project . After spending a few hours on it I realize I underestimated how much time it would take. I would like to revise my quote to double my original estimate. Is this ok to do or am I held fimly to my original quote?
View Replies !
Modify Form
I have a web page with the contents of a database dumped onto it with a link next to each of the rows. I want the link to modify the data. Each link is unique to that rows id number. Now, the problem is when the link is clicked, my information doesnt send over to the modify form link. Alright, my theory on it all...I am almost certain that the the problem is in the first few lines of code. if (isset($_POST['submit'])) How do I change that to grab the rows id number from the URL.
View Replies !
Modify $_POST
Ive seen lots of recommendations to not try to do what Im trying to do but let me put it this way and hopefully someone can tell if this is a good idea or not (or an alternative). What Im trying to do is this. I have a series of links that when clicked will navigate to a common page passing in a value encoded in the link. For reasons not worth going into I cant use a querystring. Code:
View Replies !
Having A Webpage Modify Another
I am completely new at webpage building when it comes to advanced controls. I know how to put textboxes on a page with dreamweaver. What i want to do is have page1 with 2 textboxes. Then I want it to modify Page2.html page. Code:
View Replies !
Modify Variables
I have a script and it contains a number of variables, say for eg. $apple = 3; $triangle = 7; $london = 12; is there a function in php that can allow me to physically change the value eg, on a new php script. I have a form or something that will allow me to change $apple to say 456 and then when I open the variable php the value has been changed in the script its self, so the new script reads. $apple = 456; $triangle = 7; $london = 12;
View Replies !
How Do I Modify This Ff Database?!?
I have a flat-file database, which contains a record of titles for pictures. Its lines are like: 1|This is a caption for a picture| 2|This is another caption for a picture| 3|This is yet another caption for a picture| ...and so-on. I'm trying to write some PHP code which will allow a user to change those caption titles in the database. So, I'm trying a form, which takes the number of the caption to be changed, and the new text for the caption, like this: Code:
View Replies !
Modify This Php Guestbook
I need to modify this php guestbook and I don't know how.I need php only for this matter and nothing else. The guestbook as it is works fine. I don't know php but I am pretty good at HTML.I have searched around the net and found that I can make a HTML template and integrate it , but I didn't found how.
View Replies !
Trying To Modify A Field
I have a field (item) in a table (todo) and I would like to click on a link (edit.php?id=1) that goes to a page with a form and the field has that information filled into the text box. Clickong the submit button sends the changed field to update.php. I have tried several times to get this done and search here also.
View Replies !
Cannot Modify Header
I am trying to export a query from mysql to an excel file using a code snippet I found in Zend, the code seems to work except I get : Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwofficetest.php:3) in C:wampwwwofficetest.php on line 125 and then it just ended printing the table in ugly plain text on the page. I read in another thread that if you had changed the database details in the code you would get that message, which I did because they were initially wrong. If thats the case, what can be done to fix that. If not can someone lead me in the right direction: Code:
View Replies !
Modify My Query
I'm using the current query:- $query2=("INSERT INTO query_results2 (Location1, Location2, Average_Income) VALUES ('$drop_down_box_1', '$drop_down_box_2', '$area_1')"); Now I'd like to insert the values of both $drop_down_box_1 and $drop_down_box_2 into Location1 with a comma between them(the values of both $drop_down_box_1 and $drop_down_box_2).
View Replies !
Can MySQL Modify
I've seen a web program which uses .mdu files. What exactly are these and how do they work as I can't seem to find much information on the net.
View Replies !
Modify Mktime
I'd like to echo the date 365 days from today. For example, if today's date is 2006-03-25, I'd like to echo 2007-03-25. I'm using the mktime function which gives me what I want. display the date as YYYY-MM-DD. My code is below. Could you please show me how to modify this code so that it displays the date as YYYY-MM-DD? PHP Code: $nextyear = date('j-m-y',mktime(0, 0, 0, date("m"), date("d")+365, date("Y"))); echo $nextyear;
View Replies !
Modify An Input Value
I have a input box which requests a URL from the user, this url gets stored in the db and later gets called by a page which generates a link from the value. A problem might be if the user types in www.website.com instead of website.com as the code i will be using will have the www part already on the php page.
View Replies !
|