Changing Format
I am extracting data from a database and creating a report. The date in the database is stored in the format YYYY-MM-DD HH:MM:SS but when i display the report i just want the date to be displayed as MM/DD
View Complete Forum Thread with Replies
Related Forum Messages:
Changing Date Format
If I fetch a date from a mysql field and the date is: 2006-01-12 00:00:00 Is there a way I can reformat it in php to lose the hr.min.sec so that I am just left with the date 2006-01-12??
View Replies !
Changing Time Format
I was looking forward to changing a string as "Apr 09" to "04/09". I first thought about switching through the months and preg_matching the day, and then I saw date() and strtotime(), but I don't really know if strtotime() will work with my input. How could I actually do this?
View Replies !
Changing Date And Time Format
Currently, the script has dates formatted in the European way (day, month, year) and time is in 24-hour mode. I want dates to be month, day, year and time in 12-hour mode. I tried changing this to fix the date: header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT'); To this: header('Expires: ' . gmdate('D, M d Y H:i:s', time() + 86400) . ' GMT'); That change had no apparent effect, so I'm not sure what to do. It's probably something really obvious and I just don't see it.
View Replies !
Changing Array Format From Result Of MySQL
here is what MySQL returns in a visual way.. game_id | team_id | stat_id 1 | 1 | 1 1 | 2 | 3 1 | 3 | 7 1 | 3 | 6 2 | 1 | 1 2 | 4 | 3 in records with the same game_id, there will be no repeating team_id in records with the same team_id, there will be no repeating stat_id so, after I got the query, I made them into this format PHP Code:
View Replies !
Convert UNIX Format Into An Hours:Minutes:Seconds Format
I have a a UNIX format number that I want to convert into an Hours:Minutes:Seconds format for a stopwatch/countdown timer script I'm writing. I used date("H:i:s", ($time)), but the problem is, if the period I'm counting is above 24 hours, the Hours reset to 0. So If I was counting down 49 Hours, It's be displayed as 01:00:00 instead of 49:00:00.
View Replies !
Date/time Format To Be A Normal Format
i want my date/time format to be a normal format... ex. 1-11-2006 9:20pm.. it comes out for me like 2006-1-11 21:00:30 code i have is... how could i have it so it displays it normally... <?php echo $filelist_array["date"]; ?>
View Replies !
Format Currency - Dollar Format
I want to take a variable and make sure that I output to the browser in dollar format ie if I set $price=100. I want to make sure that $price appears as 100.00. in turn make sure that when $price=100.97 is outputted as 100.97
View Replies !
Changing Php.ini
is there a way to change values in php.ini (like adding support for certain things) if you are not hosting your site yourself, like using a pay host?
View Replies !
Changing
I am looking for some help with changing this so that I can download a file as html instead of cvs. I am not a programmer so I really don't know but have good ability to follow instrctions. <? if(file_exists($filename)) { $fp=fopen($filename,"r"); $content=fread($fp,filesize($filename)); fclose($fp); header("Content-type:application/vnd.ms-csv"); header("Content-Disposition:filename=$filename"); echo $content; } ?>
View Replies !
Changing 'The Name' To 'Name
So I have a list, listed alphabetically: Attic Fish The Bear That I want to list like this: Attic Bear, The Fish Is there an easy way of doing this in a mysql query? or would I have to put all results in an array first,changing the results with 'The' at the start, and then read the results out again alphabetically?
View Replies !
Changing Passwords
I'm using proftpd with mysql, it's working great. I creaded a site that a proftpd user can use to change his password, I also wrote another PHP script that monitors passwords and if a password is about to expire (90 days), it sends out an email to the user. Now, what I need help with is when a user enters a new password, I don't want this new password to match his previous 6 passwords.
View Replies !
Changing The From Name In Mail()
I know how to send mail with the mail() function. I have looked at the documentation for php and I can not seem to get the right syntax for changing the return name. I am sending mail from my server and it uses the nobody user for the admin of apache. because of this all mail comes in from "nobody". This is really annoying me and if anybody knows the syntax I would sure appreciate it.
View Replies !
Changing Colors
I have this form where you can submit a DJ line up for an event. I want the user to be able to change the font color whenever they wish, and when they hit enter, for it to skip a line. I would like the to be able to do this without them knowing how to use the <br> and <font> commands. Kind of like you see on a phpBB board or something But is there a way to make this button, and when the click it, it keeps the text that they have already entered into the textarea adds a [ i ] or whater and then when they click the button again, it inserts the [/ i ] without altering the text they already typed. it would be much like the buttons you use to do your PHP and color changes in this forum, but without the pop-up window to enter your code into.
View Replies !
Changing Date?
In MySQL database the date format is as follows: YYYY-MM-DD But how can I make it so that when I see it on the page it will be as follows, which is English format: DD-MM-YYYY
View Replies !
Changing The ROOT_DIRECTORY
I am using XAMPP (latest version) I have got MySQL, PHP, Apache etc.. I wanted to change the root directory shown in PHPINFO(); for XAMPP for my localhost:// Is there an easy way to do this? i am a complete novice and first timer and I assume that if I change it to 'C:web' my php files (in that directory will be shown)
View Replies !
Changing Between Times
does anyone know to convert a time string in the form dd-mm-yyyyThh:mm:ss i.e 2006-08-01T15:45:11-00:00 to a normal unix time stamp or something that at least I can use to compare to a unix timestamp.
View Replies !
Changing Php3.ini !!
I need to enable magic_quotes_gpc. I have learned to get to php3.ini through FTP, have changed it's value, and uploaded the file again. However, the value does not seem to change. I am running a dedicated server, and have attempted to reboot the server. Any ideas to why the settings won't change? Could permissions be a factor?
View Replies !
Changing Session Name
Anyone know how vBulletin changes their session name from the default PHPSESSID to just a simple 's', I thought it would just be a case of: PHP Code:
View Replies !
Changing A String
I've got a form to upload a file. When a file is submitted I need to change the file name before I add a reference of it to the database or copy it to a location on the server. So let's say I submit the file "test.txt" I need change the file name to "test revision 1.txt" So I need to find the last instance of "." then move back 1 space and add " revision 1" to the string. Anyone know which functions I would have to use?
View Replies !
Changing The Location Of Php.ini
Does anybody know how to change where PHP looks for the php.ini file? It currently looks for the .ini file in /usr/local/lib. I need to change this so it looks at /home/john/usr/local/lib.
View Replies !
Changing Sizes
I have included the content on my site from another file and want the divide to automatically adjust its self to the size of the included content. In internet explorer this is not an issue, however in Firefox, Opera and I suspect Mozilla, the content overflows and the divides of the page do not automatically adjust.....
View Replies !
Changing Tables
I have my main index.php page and I've been looking around for the simplest way to do this but haven't been able to find anything that suits the purpose. Perhaps you guys can help, since you're the best.. All I want to do is switch the table that is in the middle of the page that displays the content of the page. So if someone clicks on, for example, index.php?files it'll change the table to the files table that I have in an html file or something.
View Replies !
Changing Header
I have a website that I need to change the Header and center it. How do I do that? The files are in the CMS files.
View Replies !
Changing Linebreaks To <BR>
When submittin a form, is there a way to change linebreaks to a <BR>? I know you can use ereg_replace() to replace certain characters, or set of characters, but how to specify a line break?!?
View Replies !
Changing Permission
I have been working with uplaoding of images which creates the folder automatically during uplaoding, but iam unable to change the permission of the folder. when i try changing from cpanel i get the below error. "a fatal error or timeout occurred while processing this directive" Kindly suggest me where iam wrong.
View Replies !
Session Id Keeps Changing
--when i set session.cache_limiter = private i get this Set-Cookie: PHPSESSID=61fdf683fef689d5371a1c01fd46e678; path=/; secure Expires: Thu, 19 Nov 1981 08:52:00 GMT No idea where it's pulling that date from. (Clearly already expired) --when i set session.cache_limiter = private_no_expire i get this Set-Cookie: PHPSESSID=61fdf683fef689d5371a1c01fd46e678; path=/; secure (no Expires line) But my session ID still changes every time i refresh the page. What do I have set wrong? php.ini [Session] ; Handler used to store/retrieve data. session.save_handler = files session.save_path = /tmp session.cookie_secure = 1 session.use_only_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = ;session.serialize_handler = php session.serialize_handler = wddx session.gc_probability = 1 session.gc_divisor = 100 session.gc_maxlifetime = 1440 session.bug_compat_42 = 0 session.bug_compat_warn = 0 session.referer_check = session.entropy_length = 16 session.entropy_file = /dev/random ;session.cache_limiter = nocache session.cache_limiter = private_no_expire session.cache_expire = 180 session.use_trans_sid = 1
View Replies !
Changing Titles
What I'm trying to do is have a different title per article written on my website. The way the site is run now, the server calls on an include file, but the browser still reads it as the title for the index.php.
View Replies !
Changing To HTML?
I have a piece of text which is entered into my database, this text contains HTML. When I output it onto the page I want the HTML to turn into HTML and do what it is supposed to do, instead of just being normal text. How would I do this?
View Replies !
Redirecting And Changing The URL
I have a login page which remembers what you were trying to access, then uses header('Location: url here') to redirect the user back to what they were trying to access after a successful password. However, the URL remains my.domain.here/login.php, instead of where they were redirected to... which breaks my relative links if they are redirected to a page within a subdirectory.
View Replies !
Changing From Alphabetical
I have had a developer to create a back end for my website. I can't get hold of him, and to be fair I have bothered him enough, as I am trying to learn as well That was not his job to teach me!! What I have is three pictures and text title sitting next to each other, and they are in alphabetical order...What I want to do is place the picture and text title in a different order. Code:
View Replies !
Changing An Array Name.
If I have an array called my_array1, how do I call it within a for cycle? Something like this: for($a=1;$a<=5;++$a){ $my_array = 'my_array'.$a; //prints $my_array } I know that doesnt work, so, I tried something like the following: for($a=1;$a<=5;++$a){ $my_array = 'my_array'.$a; //prints $$my_array } That does work with variables, but doesnt work with arrays. I know that in Java and ActionScript what I'm trying to acomplish is pretty simple, but I cant seem to find the correct syntax for php.
View Replies !
Changing Timezones
I have the date being pulled in an echo statement but I'm trying to use the date_add() function somewhat unsuccessfully... Declaring the current time... <?php $time = date("h:i A"); ?> and then echoing it.. <?php echo $time date_add(INTERVAL 2 HOUR)"; ?> And as guess, it isn't working and even after searching on google, I can't seem to get this one.
View Replies !
Changing The Extention
i just added the following to the htacess file on the server to get php5 working AddHandler x-httpd-php5 .php problem is when i try to open the dir on the localhost it will not open. ive tryed deleting the htacess file but this does not help. The message is "you have chosen to open which is a :application/xhttp-php from http://localhost what should firefox do with this file?
View Replies !
Changing Db Within Page
I have a php page that flips between dbs and sometimes it works and sometimes it doesn't... e.g. the first query runs from this db, the second query runs from a different db and then the third query runs from the first db again... the first query will run, the second query will run, but then the third query will not. Each time that I switch to a query that calls a different db, I used include_once "db_whatever"; before the query, thinking that, that would work, but it doesn't... Is there something I need to do to kill the previous db connection prior to moving onto another one?
View Replies !
Changing File Name
I'm trying to upload a picture and also reference its location to a mysql database. When the file is uploaded I want it to change its name to something random (with no spaces). I have the following script but when I run it it says QuoteSorry, there was a problem uploading your file. Code:
View Replies !
Changing Variables
i have some code that a form sends data to (this part works) i have it so if they order 2 or more the price is different to if they just order 1 ( a discount.)But if any of the boxes are left at zero(0) it still charges them a small fee. And when i try to change a variable in an if statement it does not work. Code:
View Replies !
Changing Field Value + PHP
I want to populate a field with a database tables data based on a users selection. The user selects an investment type from a select menu. The select menu is populated by database table. Code:
View Replies !
Changing A Page
is it possible to change a page eg: http://www.domain.com/index.php?page=home what is the best way of doing this? would the code be similar to this: PHP Code: <?PHP $page = $_GET['page']; if ($page = 'home'){ include("home.php"); }else{ include("error.php"); } ?>
View Replies !
Changing Page
what the ?action= thing is at the end of a url... not what it is just what i could search for so i can find some tutorials to get more knowledge of it. I already know some stuff i just need to refresh my memory and learn how to use them effectively and stuff. (?action= was an example).
View Replies !
Changing The Case
I wrote my whole code using lowercase image names and saved my images as uppercase. The problem now is that I have many, many image files that won't be viewed because my server is searching for the lowercase version of the files (which do not exist). I'm not too competent on directories in php, I just know enough to make simple scripts. Can anyone show me a way to set all the file names of a directory into an array, or if you are willing, to do that and change them to lowercase?
View Replies !
Changing Color
how can i change the color of $text3.i tried with html and css its coming but i dont know how to embed with php PHP Code: <html> <body> <form method="POST" action="textbox.php"> Enter The Text:<input type="text" name="text"> <INPUT TYPE="submit" name="ok" value="ok"></form> <?php if(isset($_POST['ok'])) { $text3=$_POST['text']; $para = " how are you Mr.$text3? "; echo $para ."<br>"; //echo str_replace("hello",$text3,$para); } ?>
View Replies !
Changing /view.php
I'm trying to figure out how to change the display of the URL from /view.php?q=page.htm to a simple /view/page.htm where /view/ is still a PHP script. Can anybody help me or guide me where I can get information on this.
View Replies !
Changing Row Type
while ($qry = mysql_fetch_array($p_edu)) { print " <tr> <td>$qry[cYear]</td> <td>$qry[Education]</td> <td>$qry[School]</td> <td>$qry[Program]</td> <td> <form name='form1' method='post' action=$PHP_SELF> <input name='delid' type='hidden' value=$qry[id]> <input type='submit' name='delete' value=Delete> </form> </td> </tr> "; } [edited by: ergophobe at 6:03 pm (utc) on Feb. 26, 2005] [edit reason] made code readable - linebreaks [/edit]
View Replies !
Changing Fonts In GD
I posted this problem at another board and haven't recieved a clearcut answer as of yet. Yes, they gave me a few good places to look for the problem, but nothing has helped yet. I have written a script that writes several lines of text to an image. This is not all that difficult UNTIL I attempted to use an array to change the font for each line of text. Is it possible with GD to change fonts midstream in this mannor? Code:
View Replies !
Changing Date
how to advance a date like 15 days from today would be : $next_month = time() + (15 * 24 * 60 * 60); $fifteen_days_depart = date(Ymd, $next_month); my question is if i had a date like tomorow 20060420 and wanted to go 15 days from that how would i do that with out the numbers reading 20060435?
View Replies !
|