Changing Text Colour
i had this script down but have modified it, somewhere along the way and can't see where, what i had was, if there were messages in the users inbox the word "Inbox" would go red, if there were unread messages in there the "Inbox" would go blue if there were no messages it would simple be black Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Changing Text On Page Via Dropdown Box.
I have a webpage that draws various text decriptions from a mySql database. The description displayed on the page is controlled via a dropdown box. Currently I am using Javascript with a dropdown box (onChange handler) to change the value of a textbox. Can anybody think of a way that I don't have to use a textbox(with its' scrollbars and background)? How can I change the value of a php variable by changing the selected index of a dropdown box?
Changing Data In Text Files
Is there an easy way in which I can edit values in a text configuration file? I am creating a form based interface to administrate a few text based config files. I can get the values from the file by parsing it line by line, but I cannot find an efficient way to edit data based on changes submitted in the php form. Is there any way to get to a position in a file and then overwrite any information?
Changing An Image For Text/hyperlink
I have the following piece of code, which uses an image as a button. I want to remove the image and just have some text/hyperlink which has the same effect when clicked? Would someone please help and advise what needs to be changed... <?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"');?> ....
Background Colour Not Showing
I need to use a coloured background for a page which contains tables. Using Frontpage 2k I can create the background colour OK and it views correctly; but when viewed using apache, there is no background colour, it is just white.
Selecting Colour Problem
I have a dynamic part of the page where the user can select what colour they want the bottom and top table colour to be, the thing is, on the bottom part of the table i have my advertisment link, which if someone is cunning enough they could make the colours the same colour as the link in an attempt to hide the advertisment PHP Code:
Colour Top 3 Results In A Table
I'm currently trying to make a poker league whats seem to be going well. I have populated a table with the league results, but would like 1st position in gold, 2nd in silver and 3rd in bronze. These will be the first three rows of the table, as the data has already been arranged in the correct order. I'm a little unsure how to go about doing this, and wondered if anyone could point me in the right direction. Code:
Calender Change The Background Colour
im have made a calender that i want to tie into a sql database , and depending on the value in the database will change the background colour of that day in the calender, the problem im having is with the following: $colour = "#FF0000"; // this is just to test whether the background colour changes $cal_event_opentd = "<td align=center bgcolor=#<?php echo $colour;?><b>"; but for some reason the backgroud doesnt change,can anyone tell me where im going wrong.
Comments Php Script Colour Change
i have just got a free php comment script of the net. but the defualt theme is black text on white back ground. Wile on my web site i have a dark back ground and white writing, so after many hours of php code readying and learning i have finaly managed to change most of the text into white exept for the last 3 text pices. 1. the "Name/ tilttle" of the comment/s 2. the "date and time" of when the comment was posted 3. the " comment/ text" which the user posted from what i have found i belive i need to set the colour in this part of the script here but everything i have tryed hasnt worked. 1. $COM_LANG['header'] = "Comments"; 2. $COM_LANG['months'] = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); 3. not sure where the code is for this :| i have just started with php.
Background Alternating Colour Code
Im having problem making my background alternate between colors. Following is my code, the result alternates 2 colors ok, but prints each entry from my database 30 times. Code:
Cell Colour Based On Field Data
I have a mysql database and i am using php to display some field data in a table cell on a page. The field data is either 'failed' or 'passed', how can i make the cell colour change depending on the field data result?
Image(jpeg) Upload & Resize Loses Colour?
I am uploading an image to a server and resizing the image then saving it to a directory,I had it working fine on my local machine (windows) but when i uploaded the code to the server (linux) - same directory structure etc, it didnt work the colour appeared to be removed from the image, as though the number of colours in the image was reduced to 2 or 4 or something? has anybody come accross similar problems with GD or image functions in php?
How To Update Form Input Field Background Colour On Validation Error
I have been searching for form validation scripts for ages and all th ones that I like are far too complicated and inflexible so I decided to stick with my own which is easier to understand. The only thing I don't like which i have seen on better form validation scripts is that and fields with errors are highlighted. i can only presume that they have used php to set the background color of the input field or textarea. How would I add some code to change the background colour of form elements if an error is found? Here is my code which validates the form but doesn't change form elements colours. Code:
Quickly Adding Text To A Mysql Text Field That Is NOT Empty
Is there a way to insert text into a mysql text field that already has text into it; without having first to extract the existing data and append the new text to that string variable and then insert the new string. Basically i'm looking for a way to do it with a single query not 2 (one being a select to gather existing data).
Gaining Access To How MySql Parses Text For Full Text
I want to gain access to the function or process MySql uses to parse words and phrases for Full Text searching. Here is an example. If the user inputs... Milan in history MySql will search for milan, history, and milan history. Is there a way to extract just the combination of terms MySql uses to search the db without the stop words? Stop words are automatically eliminated from the search request unless the user encloses a phrase in quotes. What I am trying to do is develop a script to highlight found search terms and phrases. I can explode a phrase into single words but if I do that the stop words would be included in the array. If there is some way of getting into the parsed words or phrases MySql Full Text actually uses to search, I can use each of those combinations as a keyword in my highlighting script. This request is about searching for the code or any code related to the questions involved.
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?
Text Area Not Accepting Large Amounts Of Text
I have a form where teachers enter homework assignments and they are then stored in a MYSQL database and retrieved elsewhere. I have been using "get" with the form. The code is simple: <textarea name="array[assignment]" cols="60" rows="10" id="array[assignment]"></textarea> It does allow post of 100 words, etc. Stuff that teachers normally submit. What's happening is that it won't allow very large posts (over 300 words maybe? ) Not sure what the cut off is. When you press submit it won't go, or there is an error where it won't submit. Is there a limit for text fields? Since the fields scroll, I didn't think that having only 60 rows was any type of real limit, I though you could put in as much as needed. But then all of it ends up in the address bar, so there must be a limit of some sort.
Read And Display Japanese Text From Text File
I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with the same problem. The plan was to make a script to read and display japanese text. I will use it for making a japanese proverb script and for a japanese language study script. Method : I wrote a simple kanji text file (saved with UTF-8 encoding) I wrote a simple PHP script to display the file contents (saved with UTF-8 encoding) I specified the content-type header for the HTML page : <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> *** All files have the same encoding. *** UTF-8 supports japanese characters. and it works! this is my PHP (and HTML) script : <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>PHP : Japanese Text File Read : Exercise 1</title> </head> <body> <?php $filename="japanese.txt"; //open file $fp = fopen($filename,'r'); //loop through each line in the file while($line=fgets($fp)) { //output current text file line print $line."<br>"; } //close file handle fclose($fp); ?> </body> </html> I know it's a very simple script, for testing purposes only. It displays the contents of the japanese text file line by line. The key was to save all files in the same encoding (I used UTF-8) and to specify the encoding / charset in the HTML header (<meta http-equiv="Content-Type" content="text/html; charset=utf-8">)
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.
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.
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.
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
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)
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.
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?
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:
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?
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.
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.....
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.
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.
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?!?
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.
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
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.
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?
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.
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:
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.
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.
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?
Changing File Name
I'm trying to upload a file, assign it a random name and then reference it too a database. I am using the following script to achieve this but its not working, when I run it all I get is my own error message "Sorry, there was a problem uploading your file.". It is however putting a random number into the databse but it is not adding the extinsion type back on. Code:
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?
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:
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:
Append Text At End Of Existing Text On Same Line
I'm working on a part of my web site that uploads images, then writes the name of the image to a text file. The upload part works fine. The part that writes the name of the image to the text file works fine. What I'm trying to do is, after all the files have been uploaded and all of the image names have been written to the WriteTo.txt file, append a written description of the picture at the end of the picture name. In other words, after a user uploads their pictures to the server I want to direct them to a page where they can label each of the pictures using a form. PHP Code:
Adding Text To Text Window With A Button
I have made an admin section of a site, What i want to do i have buttons under that have "BOLD" "center" and when clicked it adds <b></b> tags to the text area etc etc.. if the text area was called "message" how would i going about coding the images / buttons to add the code?
PHP - Using Mail() And Unicode Text - Text Gets Disturbed
I have the following problem. On a website there's a (simple) feedback form. This is used also by Polish visitors who (of course) type Polish text using special characters. However, when I receive the text in my mailbox, all special characters have been turned into mess...... For example: "wspólprace" is turned into "współprace". It seems PHP is handling the Unicode-8 strings quite well (when I 'echo' the strings on the site, I see the text correctly), until the point that it is send by using mail(). Is this a server configuration issue? Or something else? How can I get my text to remain in Unicode? I have this problem both on my testserver (Apache 1.3.28, PHP 4.3.2 on Windows XP) as on my providers server (Apache under Linux).
|