Pointer Of Mouse And Text Form.
Anybody know wether one can create such text-form that pointer of mouse will be automatically set in the text field of form? It means that user can type text immediately after page has been loaded, without putting pointer of mouse by hand in the text field.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Detect Mouse Click
Is it possible to detect where on a page someone clicks with PHP? If so, can you point me in the right direction?
Larger Image On Mouse Over
Could somebody help me with how to display a larger version of an image when the mouse hovers over the thumbnail? I have an index page displaying some thumbnail images. I have a slightly larger version of the image saved which I would like to be displayed momentarily as the mouse hovers over the thumb.
Disable Right-click On Mouse
Is there a php script that wil disable the right-click on mouse or maybe disable the copy and paste feature of the browser? because i have a client, wherein he wants to prevent public viewing his website from copying his website content?
Simulation Of Left Mouse Click
I was looking for this script for some time now But still didmf fined a salution. I need a script that simulates a left mouse click on specified area of the screen when the page is loaded.
Keep Text In Text Boxes After Form Is Rewritten
I'm trying to make a form that does the following: (1) the user answers a question by typing in a text box (2) a response is then written below the form, saying whether the answer is right or wrong and, perhaps making a comment of some kind (3) the user's answer remains visible in the original text box I've managed to write some code that does the first two things, but despite many attempts and much searching for code examples, I've failed to find a way of getting the answer to reappear in the text box when the page is rewritten. This is my code:
Possible To Keep A Pointer To An Object In A PHP Variable?
Is it possible to keep a pointer to an object in a PHP variable? I'd like to do this : $obj1 = new myClass(...); $obj2 = $obj1; $obj1->name = "foo"; $obj2->name = "bar"; echo $obj1->name; Which would display "bar" instead of "foo" with the current PHP behavior.
Find Name Of Domain Pointer
I have several domain pointers that point to my main domain. My hosting company automatically redirects visitors to my main domain, if a domain pointer is used, but how do I determine which domain pointer the visitor used to get to my site? I was using Request.ServerVariables("SERVER_NAME") in asp, but I can't find a php equivalent.
Setting Array Internal Pointer
I was wondering if there was a way to set an array internal pointer to the array element in one step rather than running a loop where you use next() or prev() until you stop at the point you want?
When Is A Database Resource Pointer Not Valid, And What Test Can Be Run?
I posted before, but have now narrowed my problem down to this method. At the start of the method, I test to make sure that I have a resource, a pointer to data returned from a database. This test is coming back true, so the next line runs, which attempts to get the next row from the dataset. This brings back nothing. On the queries I'm running right now, the first row will be fetched, but then no further rows. If I expect 20 rows back, I get one, then 19 errors. I use phpMyAdmin to run the query in another environment, to be sure of what I should be expecting.. /** * 11-04-03 - it is important that the resource which points to the returned dataset gets passed into this method * by reference, not by copy, or else, in the outside code that is calling this method, the pointer in that resource * will never advance to the next resource row. */ function dsRowIntoArrayWithStringIndex(&$dsResult) { // 11-04-03 - this first lines test to see if anything came back from the datastore if (is_resource($dsResult)) { $row = mysql_fetch_array($dsResult, MYSQL_ASSOC); $row = $this->stripslashesFromEntryWithKeyIndex($row); return $row; } else { $this->resultsObject->addToErrorResults("In dsRowIntoArrayWithStringIndex(), in the class McFormatResultsMySql, we expected the method to be handed a pointer to a database return resource, but we were not."); } }
Form To Text File
I don't know anything about PHP, ASP, CGI, all I can do is use Microsoft FrontPage to edit html. But I have been searching the internet for a script (any laguage) that can send an html form to a text file. But I need the new data to replace existing data in the text file every time I submit new information. Is this possible in PHP or any other language? I’m hosted on a UNIX server with php installed and I have access to my cgi-bin and all I need is this little script to complete my website.
Populating Form Text Box.
I have a PHP form for entering data on-line into a mySQL table.. Because of the intended search facility, I require one field in the form to be completed with exact and precise item names and spelling. In testing, I had achieved this with look-up tables. Ideally I would like the selected item from one of five drop-down lists to autopopulate the form text field when selected. Alternatively at least the option of copy and paste. Copy and paste - for some reason will not work. Autofill worked fine on a test form with no database connection and in standard HTML and javascript, however, once the PHP is added to the page neither method works. Could anyone please point me in the direction of how to get the autofill to work?
Form Variables And Text Characters
Well I´m having trouble with text formatting I think. You see I have a flash form, which sends variables via POST to a php file that looks like this:
Editing Text File With A PHP Form
I am trying to do something with PHP that i am sure is pretty easy. But not sure myself how to do it. I have a file that i want to pull into a simple HTML Form text field. From that field the person can just add in content or remove content.. Click "Update" .. And it will write the new content out.. Overwriting the old file if need be.
Form Post To Text File
I have a form that posts to my php file which in turn writes to a text file. The way I'm doing is probably far from efficient or the right way, but it's the first thing i've ever written and I have to get it done. The way it writes now is it just puts all the form input next to each other in a text file. I want each field to be delimited or on new line so I can read it easily. Here's a snippet of my code: <?php> $filename = 'orders.txt' $fp = fopen($filename, "a"); $string4 = $_POST["email"]; $string5 = $_POST["street1"]; $string6 = $_POST["street2"]; $write = fputs($fp, $string4); $write = fputs($fp, $string5); $write = fputs($fp, $string6); fclose($fp);?>
Form Text Field Validation
I've got a form and I'm now trying to validate the text fields in it. The field I want to validate is for someones name, so there should only contain letters. Below is the function I've written to handle this. Code:
Increment A Text Field In A Form
I am creating an intranet which shows active projects and allows people to add new projects. If users want to add a new project, they fill in a form but what I want the form to display in the ProjectNumber field (which is a var char field & not the primarykey) is the last Job Number incremented by 1. For example if the last ProjectNumber was TS0014, then the default value in the ProjectNumber field should be TS0015 - this way users know what the next job number is. At present, the last job number in my table is TS0014. Below is the code i'm using but for some reason in the Job Number field in the form Im getting TS001? WHY? Code:
Submit Form Via A Text Link
But I have a few input fields, but the submit button is not a button but just a text link. How can I create the text to act as a submit type to submit the form?
Updating Text In Form Submission
I am using a text area form submission to add imformation to a html webpage, and I would like to be able to edit that text in the php form at a later date after submission. Does anyone know how to get the origonal text back into the form text area for editting and resubmission?
Form Field Text Output
How can I get html code in an editable form field to display properly? Specifically: I have text that is echoed to a form field via <? echo $text ?> The user can then edit that text and submit. However <BR> is showing up as a literal <BR> and should be a linefeed. Is there a way to have this display properly? Example: LINE ONE<BR>LINE TWO should display as LINE ONE LINE TWO Note that this is only a problem in the form field. It displays properly when echoed outside of the form.
How To Get Un-escaped Text From A Form Field
I have a php script that gets the text from a form field: <?php include("global.inc.php"); pt_register( 'POST', 'test1'); echo $test1; ?> The text comes back fine, just some characters (', " and ) are now escaped (', " and ). The problem is that I need the he text to be exactly as it was entered by the user. I could process the text myself, and replace the escaped characters, but I'd like first to understand why this is happening and if there is a way to disable this behavior and get the unmodified text directly.
Add A Text Box Form To Buy Button Code:
cuttently we have this code which generates a buy button on a page. where the "product_ref" call the data. Is there an easy way to add a text box with one of these codes so a number can be entered in to post to the cart as well so the item can be personalised? Code:
Keep This Text Area From Being Edited In This Form
I need the textarea so it can not be edited by the user..... how can I hide it and keep it so it can not be changed <textarea name="body" id="body" cols="50" rows="15">'.$_CONFIG['MAIL_BODY'].'</textarea> this text area has an email message for my inviter script but I dont want the user to be able to alter the body... how can this be achieved? I manages to hide the subject by ussing type hidden but I dont know how to do it with this text area.
Deleting A Line Of Text From A Txt File From A Form
How can i delete a line of text from a .txt file using a form? because i have a form right now that saves information from a form to a txt file for news, now i need to know how to make it so i can delete it from a form. also, if you know how, how do you overwrite lines of text in txt files from a form?
Form Data Inserted Into A Text File
I am wondering if it would be possible to create a form and using php have the form data inserted into a text file. The data would have to be inserted in a given way.
Writing To Heredoc From Text Area Form
I can't seem to get heredoc to populate correctly with variables through a form. <textarea name="Template" rows="10" cols="80">Template Here</textarea> Contents could be something like: I want to replace $myarray[0] and another variable $myarray[1] I call heredoc this way: $hubarray = explode(" ", $contents); $template = $_POST['Template']; foreach ($hubarray as $val) { $hostarray = explode(",", $val); $output = <<<EOT $template EOT; I'm feeding it a file that has multiple rows separated by as array 1 and within those rows are fields separated by "," for array 2. I'm trying to iterate through the arrays and populate heredoc($template) accordingly.
Editing Text Files In Form Textareas?
I want to pull text files into a form text area and then edit them. to open the file I am using: $toEdit = fopen ("../content/concept.txt", "r+"); which does not work at all unless I change the path to c:xxxxxxxxxx but I dont want to do that. If I use the hard coded path I get permission denied, if I change the file to read only it seems ok - however, I want to load it into a form textarea? Cant work this out, then I want to save it. Its just to update a simple text schedule. there will be no special characters that need escaping etc. This is probably a pretty basic question but I have been asked to do this ASAP and my attempts so far have just confused me!
Text Within Textarea Shifted After Redisplay Form
After a redisplay of the form, caused by errors in other fields, the text which is in the "Observ" textarea is shifted (some 8 places) to the right (and this each time after a redisplay). The code used in case of redisplay is : <tr> <td align="right"> Observations : </td> <td> <textarea align="left" cols="50" rows="10" name="Observ"> <? echo $Observ ;?></textarea> </td> </tr>
Posting Information From A Form To A Text File
I am trying to append the results from a form to a text file. My code is supposed to print out the results on one page, and append the results to another page each time data is entered on the form and the submit button is hit. Unfortunately, it is only printing out the message acknowledging the submit button--no data on either form. Code:
Validate An Email Form Text Filed
How would i run a check in my datacheck page to see if the user entered an email address in a form text field? if(empty($email_address) || - NOT VALID EMAIL STUFF HERE -){ $msg[] = $error12; }
File Re-writing And Moving The File Pointer
i have a text file that looks like this: <bt>600</bt> <iregno>123123</iregno> <users> <un>2</un> <u1> <n>Username</n> <ema>username@domain.com<ema> <s>password</s> <t>user type</t> <p>profile name</p> <cat>000000000000000000000000000000000</cat> </u1> and so on </users> Now i run this big user edit function where im reading in their details and displaying them in forms and so on. They then edit the form fields and i read them back in using $POST. That's the easy part. What i then want to do is re-write a section of my text file. I have a variable that tells me what user i need to re-write the details for, i also have all the new details that i need to replace the old ones with. So, in logical terms, what i need to do is move my file pointer to that section of the file: read in $userToEdit variable -> output of variable is <u1> -> move file pointer to next line (<n>username</n>) and let me rewrite the next 6 lines therefore leaving the pointer at </u1> I hope that makes sense. Just basically want to rewrite the text that is there, not append/add.
Formatting The Contents Of A Text Area Form Field
On my site I get users to enter a load of information in a textarea box, however when i save this data to my mysql DB and then retrieve it, it comes out without all the formatting, like new paragraphs and new lines. Can anyone tell me how you can capture the data entered into such a field with all the formatting the user has entered like new paragraphs etc?
Clearing The Input Text Field After Submiting The Form To A New Page
I have a page with a form with an input text field ... and when a user types his/hers ID ... and submits the form - his/hers page opens in a NEW window .... but the value (ID) that was written in the original window remains. I want to make sure that the form input field on the original page becomes "invisible" - by refreshing/reloading the original page or just by clearing the input form after submission. For now I have put in a meta refresh tag in the head of the html file ... but that is not the solution ... becouse I only need a one time refresh/reload of the page ... and this is to happen right after the input text value is being submitted.
Table Based Order Form That Can Email Text Entered?
I have a custom order form that I collaborated on with a friend who knows php. The form needs updated and the code we put together is hard for me to read and update. I think the form can be refined or rewritten in a more OOP way and hopefully as sematic as possible. The Form is for entering ready made frames. The Choices are color and size. Here is what I need to do: Enter Name, Email, Store Number, Comments Etc.Create a table based form where users can only enter numbers in each text field.Upon completion, agreement, and submission of the order an html email is kicked to our inbox. The table remains as it was on the website due to html and a separate print css file. Code:
Array Query - For Adding Alt Text To Multiple Image Upload Form
I've set up a form for uploading multiple images and I am writing the urls to a database, which is queried and outputs the images on a web page. This works fine, however, I also want to add alt/title text for each image upload but can't quite seem to get it working. I'm pretty new to PHP so my knowledge of how to use arrays is fairly limited. Code:
File Pointer At Beginning Of File
The following is taken directly from the PHP quick ref section under fopen. 'r' - Open for reading only; place the file pointer at the beginning of the file. 'r+' - Open for reading and writing; place the file pointer at the beginning of the file. 'w' - Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'w+' - Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'a' - Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'a+' - Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it. None of these do what I want though one of them say they will. I need to write input from a form to the beginning of a text file. But when I use $myFile = fopen("file.txt","r+"); it writes to the beginning of the file. But when I execute the script again it writes OVER what was previously there. I need it to INSERT the input from the form. I'm fairly new to PHP so if I've not included some valuable information let me know.
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.
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">)
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).
|