Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Delete Text In Inputboxes


I fill out an inputbox and press submit, when I press back or even reload in firefox, the inputboxes continue to have the same values filled out previously.




View Complete Forum Thread with Replies

Related Forum Messages:
How To Delete Only Certain Text In A Mysql Row?
I have a table setup that has a column setup as friends and users can add friends to this column no problem.

What I would like to know is how to delete only certain parts of the text of the row/cell where their friends are stored.

The friends text is seperated by the following :

" , "

That is a space on either side and comma in the middle of the space.

I know how to explode the results and put into an array to display the reuslts, but is there a way to delete only one of the friends if the text is as follows.

 , thomas , frank , irene ,

I think you can get the idea.

Is it possible to do this or should I just update the whole cell without the array[$i] result being the friend?

View Replies !
Delete First Line Of A Text File
how i can open a data.txt file and remove the first line and then save it.

View Replies !
Check ' In Text File And Delete
I have 6 document files and some file has ' each line in text about 1000 lines. I want to clear all ' each line and I save all files same folder, how should I do?

View Replies !
Delete First 9 Lines In Text File
how I can delete the first 9 lines in a text file?

View Replies !
Delete Function That Deletes A String Of Text
I am trying to fix my delete function that deletes a string of text that may or may not have single, double quotes, pound signs etc.

function delete_bm($user, $url)
{
// delete one text string from the database NOT a url as would be suggested
if (!($conn = db_connect()))
return false;

// delete the Item
if (!mysql_query( "delete from XMAS_WISH_LIST
where username='$user' and XMAS_ITEM='".mysql_escape_string($url)."'"))
return false;
return true;
}

When I run this on my web page, I don't get an error, it just does not delete the item that I am passing it, like the following: "test" (with quotes).

Any suggestions?

View Replies !
How To Delete Single Email Adres From Text File
I have a textfile:

bla@domain.com
blabla@domain2.com
haha@domain.com
la@domain3.com
zaza@domain4.com

How can I delete a single email from that text file ? E.g. I want to delete blabla@domain2.com so that the textfile will be:

bla@domain.com
haha@domain.com
la@domain3.com
zaza@domain4.com

How can this be done ??

View Replies !
Delete Entire Line In Text File If Anything In The Line Matches Search String
how would I code a php script that would open a text file, look for a string i specified, and if it finds that string, it will delete the entire line in the text file that contained that text. I'm new to php, so sorry if this is really obvious..

View Replies !
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?

<?
include("dbinfo.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";
mysql_query($id);

mysql_close();
?>

View Replies !
String Replace :: Delete All [img] Tag In A Text String
i need a function that delete all [img] tag in a text string for sample:

$string = This is my text [img:Blue hills.jpg,align=,width=700,height=525,vspace=0,hspace=0,border=1] it's contain many [img:rings.jpg,align=,width=400,height=325,vspace=0,hspace=0,border=1] i want to delete it";

i want affter processed $string will be "This is my text it's contain many i want to delete it". and two jpg file that included in that tag will be save in a array like this: $image[0] = "Blue hills.jpg" , $image[1] = "rings.jpg" .

View Replies !
Mysql Delete - $query = Mysql_query("DELETE
how would i do the following ?

$query = mysql_query("DELETE notes, datestamp, abs_value, ID FROM absence_mgt  WHERE datestamp='$date' AND ID='$vtc_login' ") or die(mysql_error());
im just getting "Unknown table 'notes' in MULTI DELETE" ?

View Replies !
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).

View Replies !
Rich Text Editor Which On Submit Updates The Field To Have The New Text
I have my content stored in a database. I need a rich text editor (so the user doesnt need to include HTML) so they can edit contact. So a rich text editor that displays whats in the current content field and can be edited so on submit it updates the field to have the new text. Get what i mean?

View Replies !
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.

View Replies !
Create A Simple Text Editor That When Used Adds The Text To A .txt File.
I am trying to create a simple text editor that when used adds the text to a .txt file. At the moment im having trouble with the formatting of the text in terms of new lines.

If i write in one long sentence the positioning of the text is fine however if i try to use paragraphs extra lines are added in and then the code gets confused and makes parts of the paragraphs titles, shown in bold.

View Replies !
Regular Expression :: Replace Nested Text With Replacement Text
How can I setup a regular expression to replace nested text with replacement text. I can't explain it very well, but say I want to replace [asdf] with <asdf>, and my sample text is: Code:

[asdf]adsfasdf[asdf]adsfadsf[/adsf][/adsf]

I end up with this: Code:

<asdf>adsfasdf[asdf]adsfadsf</adsf>[/adsf].

View Replies !
Display Some Text To The Screen Via A Link To The Text In A Mysql Db.
I am just screwing around a little and trying to display some text to the screen via a link to the text in a mysql db.

View Replies !
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.

View Replies !
Imagettftext() Gives Grainy Text When Writing Aliased Text
I'm using a bundled version of GD: 2.0.23 compatible. When using the
function imagettftext() with a negative color to get a aliased text,
the text gets grainy. What could be wrong? I've tried several ttf
fonts, with the same result.

View Replies !
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">)

View Replies !
GD Text Alignment - Specifically Place Text Over An Image
I need to specifically place text over an image. I've got the image creation down, but all I can seem to do is center the text. So lets say I have an image 300px(W) by 150px(H). I want to right align the text.

View Replies !
Search Text - Click To Make Value Text Dissapear
I am using php for my site and in the header I have the code below for the search box. Inside the search box I have Enter Keywords. Does anyone know how I can make the text dissapear when a user clicks inside the search box once? Code:

View Replies !
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:

View Replies !
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?

View Replies !
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).

View Replies !
Remove Text Header In Text File
I have been having trouble removeing two header lines at the top of my txt file. You will see in my code the different things I have tried but with no luck. Below I posted my script and data. I am doing a few other things in my script as you will notice but this is the only thing I am having troble with. Code:

View Replies !
Parsing Text - Capture Text Between Two Tags
I want to have text in files, such as

{body}
{/body}

and then be able to open that file and grab all of the data inbetween those tags. I could open the file and go through it until I see the {body} tag and then store data until I reach {/body} but that is a bad way to do it.

View Replies !
Text Returned From DB Gets Cutoff When Placed In A Text Field
I have a string that contains an apostrophe or a quotation mark, stored in a DB. I can retrieve the data, and display it properly (for editing) in a textarea, but when I try to put the string in a text field, it get's cut off right before the questionable character.

For example:
$string_in_database = "John's car."

 -displays correctly here <textarea><?php print $string_in_database ?></textarea> and displays this - John's car.

 -gets cutoff here <input type='text' value=''<?php print $string_in_database ?>' /> and displays this -  John

I've tried adding slashes and stripping slashes and I just can't figure out what I need to do.

View Replies !
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:

View Replies !
Use Htmlentities When Inserting Text Into A 'text' Field
Should I use htmlentities when inserting text into a 'text' field or should I leave the input and htmlentities the output when displaying?

Pound signs etc work, but having issues with & (&amp;) and trying to strip_tag at the same time?

View Replies !
[Resolved] Removing Text From A Text File?
just wondering if it is possible to remove text from a text file. I have a text file with ip addresses and i want to remove a persons ip address when they go to my webpage. if it is possible could someone please show me how to do so.

View Replies !
Include Text Files For Text Content?
Is it pretty standard procedure to use .txt files to store textual content on a big site? I have the content set up in the database right now, but management is a headache at best and I want a system whereby I can easily edit the content from a text editor or from a browser interface.

I can see the text file solution filling both of these needs, not to mention that in my preliminary testing it was almost twice as fast as calling from the database (even with good indexes). I just don't want to redesign my whole system only to find out that someone already tried it this way and it didn't work.

I also have a search page to worry about, for which I was planning on simply iterating through the files and checking each as I would a database entry. The search page is almost negligible, though. Not only does it not get much traffic, but we're mainly a catalog site, so anyone searching the site would likely be searching products anyway.

View Replies !
Inserting Text From Text Upload/file
a client needs to put a over 500 text files into a mysql database, which will also have to be searchable (but thats not the issue at hand). is there an easy way to mass insert numerous text files into the database either by reading the files locally, or through a directory online.

View Replies !
Script To Parse Text From A Text File.
I've got a problem building a script to parse text from a text file. Everything works great for unique strings of text, but there also strings in the text file which are not unique. E.g. the text file contains the following text "bla blaa text=bloeb1 blabla text=bloeb2 bla"

I want to extract the 'text' variables (with values bloeb1 and bloeb2) from this text file but I don't know how much text variables are present in the file. So, it's possible that there is also a bloeb3 or a bloeb10.

View Replies !
Adding Text To A Search Box By Clicking On The Text
I'm trying to create a series of hyperlinked strings such that when the user clicks on the hyperlinked string, the text automatically goes into a search box and all the user has to do is to press a button to execute the search.

I am expecting this to be easy, but I have no idea how to link the two parts up.

My expection is that this involves making the search box dynamic. But of all the tutorials I've read, you can create an initial value for the statement within the search box by simply using the "value" command, but I've not seen a way to manipulate that value statement on the go.

View Replies !
Use A Text Area Which Will Show All Formatted Text
i have no clue how i pull it off what i how can i use a text area which will show all formatted text so if a user presses enter to add a new line or start a new paragraph example shown below i went to the shop and bought (pressed enter) 500 cakes. where when a user enters and submits to my db and i retrieve the text it loses all user formatting and will appear like this i went to the shop and bought 500 cakes.

View Replies !
Delete From $var
Is it not possilbe to have a variable for the table name in a delete statement (mysql database). inside an if this button is hit statement I have:

$sql = "delete from $type where id_num='$number'";
mysql_query($sql);
echo "$sql";

when it echos $sql it doesnt have the $type var where the table name should be, it just leaves that blank.

View Replies !
Delete A Row
This should be simple enough but for some reason it's not working. The $name is a number which is being posted across when the user clicks submit. I want the PHP to then access the Database with this number and use it to delete the staff ID (which is a PK).

With this code I get the error:

Warning: ociparse(): supplied argument is not a valid OCI8-Connection resource in /homedir/ilex-s01/jmsuther/public_html/DeleteStaff.php on line 16

Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource in /homedir/ilex-s01/jmsuther/public_html/DeleteStaff.php on line 17
;

The code is:

$name = $_POST["staffnodelete"];
IF ($staffnodelete=="" )
{print "You selected $name - for deletion ";}

putenv("TNS_ADMIN=/u1/oracle/Products/shu10g/network/admin");
$con = OCILogon("username","password","10g");

$query = "DELETE FROM staff WHERE staffno = $name";
$query = $query_post [$name];
$stmt = ociparse($conn, $query);
ociexecute ($stmt);

View Replies !
How To Delete
how to delete mysql row at php with checkbox?

View Replies !
Not Able To Delete
I've written a script to display all records in a database table and allow the user to select a record for deletion by entering it's ID number into a form at the bottom of the page.

When they click on the Submit button, it refreshes the page & shows the entire record that they selected and it asks if they're sure that they want to delete it.

There's 2 radio buttons that that allow them to select either "Yes" or "No". Everything is working fine up to that point. Where I run into problems is that no matter whether they choose yes or no, the record does not get deleted.

View Replies !
Delete Row
I am having a little problem with the following row to delete a row from my table. This script works fine on my home testing server but as soon as I put it onto my main web server it does not work and gives me an SQL syntax error. PHP Code:

mysql_select_db($database, $connect);
$sql = "DELETE FROM prices WHERE id=$id";
mysql_query($sql) or die(mysql_error());

View Replies !
Row Delete
what i am trying to do is delete all rows except for the last 20 rows, anyone know how this can be done?

basically i am keeping track of profile views so i know what members lasts seen who... my questin is how do i delete all but that last 2o for each $Member?

View Replies !
Delete
In one part of a review site i am making it allows top level users to make reviews witch includes uploading a picture and then changing the name to [name of review].[whatever], also it allows people to edit the review and change the picture, how exactly would i go about getting rid of the old picture so that i dont have to do hours of clean up.

View Replies !
Delete From Dir....
I have a field named 'path' in my db that has the exact same number(path) as its counterpart folder under cart/zips.

So my path in my db might be &#65533;', and in cart/zips you'd have the folder 23423423. There is a corresponding session with each 'path' row. Based on the session, I want to retrieve the path name and delete its counterpart folder name (and all it's sub-files it may contain).

The delete_all_from_dir function below is deleting the whole zips folder when I only want it to delete the path folder below it and its contents. Code:

View Replies !
How To Delete Fields
I would delete with php, all record of a table mysql where the seven left chars of the field is equal to the data in input($seven_chars).

I have used the the belowe istrucrion but it do not work.how can I do?

mysql_query ("DELETE FROM my_table WHERE substr(myfield,0,7)=$seven_chars");

View Replies !
Delete A Line In PHP
What i want to do is to open a file read the file Select a particular line from the file and delete that line and close the file. How to do it in PHP.

View Replies !
Can't Delete Cookie
Right I am quite new to php but have managed to create a simple log in/log out thing with cookies. All was working fine and as expected until I added a new section of the site. The new section stores another cookie (latest message user has read) so that next time they visit the site it will highlight the 'new' messages.
However since adding this I can no longer log out.

View Replies !
Can't Delete Cookie, Help Please~
Page1: <? setcookie("book_id", $book_id ); ?>

Page2: <? setcookie ("book_id", $book_id, time() - 3600); ?>

Can't delete cookie at once but reload page 2 two times
how to delete $book_id cookie without reload?

View Replies !
Cookie Won't Delete
I'm trying to setup a simple user authenication for my site. I'm using cookies to pass the credentials between pages. But the function header() is giving me problems logging in and logging out. As you can see in the code below, I try to redirect the user to a page after setting or deleting the cookies. The scripts redirect okay, but the user never logs in and never logs out correctly. The scripts works correctly (logging in & logging out) only if I comment out the header() function.

Here's my code for setting the cookie (login.php):

View Replies !
Delete All Replicated Except One
I ran PHP codes that creating tables and inserting records to tables., But something happened, someone of them is inserted more than once.

aa1345 | Ninsonoto
aa1345 | Ninsonoto
aa1348 | Ayumi Tohina
aa1348 | Ayumi Tohina
aa1348 | Ayumi Tohina

There are thousands of records there. So I think i have to write a script that able to delete all the replicated except one..
e.g : Delete four of aa1348 records.

View Replies !
Delete New Lines
I would like to delete the new lines, I mean the, so Itried this:
str_replace($row['facts_conten t'], &quot;
&quot;, &quot;&quot;) ;
But the new lines are still there, how can I do?

View Replies !
Can't Delete From Table!
I'm not to familiar to php and sql. I have this assignment to read from database in a table and I HAVE TO be able to push a button causing one costumer to vanish. something to do with id = $id... can anyone help me... and help me fast!

This is my code:

View Replies !
What Is The Best Way To Delete File ...?
I have script that allows a user to upload a txt file for processing, filtering, to save bandwidth,instead of user reuploading the file everytime he/she does a new process on the same file, i save the file to the server, and process from that file. What I want to be able to do is, when the user uploads a new file, or leaves the site, this temp file is automatically deleted (saves disk space).

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved