Editing And Overwritting Data In .txt File
I have a page whereby a text area is shown, and the initial value of it uses php to display the contents of the .txt file so that a user to update the paragraph of text shown and click submit to overwrite the .txt file with new information. The problem is i have no idea how to code it so that i can make the .txt file be over written. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Editing Data
What i want to do is edit details that have been taken from mysql database and display them in a text box. I'm under standing what I’ve done so far which was to bring the job id code of the job that i want to edit from another page and i no the code to edit but what i can’t do is display the job data into a text box so it can be seen and edits can be made. All the books and website and forms I’ve read don’t show how to display the data to a text box or it’s so complicated that i don’t have a clue what’s going on? Code:
Displaying Data In A Editing Form
I have a form that has three checkboxes. A,B&C. Data from A & C has been entered into the database by serializing it.I now want to create a edit form where the user can view his choices ticked. <form action="postoDb.php"> A<input type="checkbox" name="Choice[]" value="A"> B<input type="checkbox" name="Choice[]" value="B"> C<input type="checkbox" name="Choice[]" value="C"> </form> //postodb.php $bn = serialize($Choice); sql ="insert into table (choice) values('$bn')";
Making A Basic Data Editing Page
Alright, I want a page where the administrator has rights to edit the user data by msql_query("UPDATE..."); I know how to do this no problem Because some fields are drop down menus or fields and most of the old data is entered taking the info from the SQL database. How can I make it so if you only change the username so it won't change the password and the email and so on.
Class For Editing Mysql Data From A Users Point Of View
I was wondering if you know of any good php class for editing mysql data from a users point of view. Kind of like PHP My Admin but then really simple and efficient. I have a look at www.phpclasses.org, but have not been able to find anything.
INI File Editing...
Does anybody know how to open up an ini file and edit one section? like find the section called [votes] and just replace the values underneath it, in that section alone? vote.ini [votes] a=7 b=2 c=55 d=0 find that section, replace the values with there new numbers, without having to deal with what sections come before and after this, in the ini file?
Php.ini File Editing
I need your knowledge, I want to add to my website php.ini file to change the settings of my mail() function so that my function is working fine except that the sender email is not my user but nobody@hostingprovider.com so Someone told me that its easily edited using php.ini but he dont know how, so I thought that you could help me in this situation. more details about my hosting: - Linux host - php 4.4.6 - apache
Editing An Xml File
I have an xml file that I use to store information in. I want to be able to add info to it without deleting whats in the file.
Editing Info In A File
I am using a tab delimited file to provide information for a page to be displayed. I have used fgetcsv() to get information from the file, and it returns an array of information. I was wondering if there is a way I could change information in the file. For example lets say that $content[2] = "This" how could I change it so that, $content[2] = "That". I know how to change the variable to a different value, but I haven't figured out how to change the actual file.
Editing One Line Of A File.
MySQL ahs been giving me tremendous problems ever since I tried to switch to version 5.0.20. I thought that I might make my own SQL program, out of PHP code. But if a user of it has a table with hundreds or more entrys, editing one line would take hours. If you can't get PHP to edit one line with a few functions, what about splitting a file into three parts and then merging them together after editing the middle part, like so: Code:
Editing A (config) File
I have a file with some configation in it... I am wondering how I correct single values in there. The most secure is to recreate the file, then rename it. But is there a way to correct a line in the text file? setting1=bla -setting1=blablabla Needless to say, there are things in there I'd like to keep at all times.
Editing A Line In A File
I have a php file, I need to open it, find the line that reads "$pass[0] = "fa03eb688ad8aa1db593d33dabd89bad";" and edit the value "fa03eb688ad8aa1db593d33dabd89bad". How can I do that, I have #Open the file $ourFileName = "access.php"; $fh = fopen($ourFileName, 'r+') or die("Can't open file"); fclose($fh);
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.
Problems With Reading Data From A Text File And Inserting The Data Into DB
Ive been having problems getting this to work for 3 days now. Basically what im trying to do is read from a text file and insert the information into mysql. The text file is in this format: "LuCyndi@infiniti.com","carol","kellerhals","109 veeder dr","las vegas","NV","89128","702-254-2061","45" "the_prophet@att.net","a.","cohen","6794 e. bonanza rd","las vegas","NV","89110","702-463-6569","55" I understand how to open files to read but im having problems turning each set of data into an array so i may insert it into mysql. If someone could please help it would be appreciated.
Editing A String To Add A Before A '
Is there a function that allows you to add a before a ' in a string. This is needed to store text in a mysql db and i was wondering if there is function which can do this to any ' which DO NOT already have one before them, this is so i can keep editing my text without all these building up.
Editing HTML/
I'm looking for a way to editing my site on the fly (unfortunately I don't have DB support). I've been messing around with file functions, and that part seems to work fine. My problem is that backslashes are being added when I post the form I use to edit the files, and if I understand it correctly, I can't just use stripslashes() since there are some backslashes I need to get through (like)Any solution to this?
Editing Rights
Is there any way to allow a PHP script editing rights to every file on its filesystem?
Editing .htaccess
Is there a way to edit a file (in this case .htaccess) in PHP to add a line of code? EX. What I want to do is add this line to .htaccess: DirectoryIndex main.php?id=5
Editing A Table
is it possible to print a table and then that the user can edit it? My site is for an institute so in a colum will appear all the names of the students and I want that they can give all the notes next to their names, so I was thinking in do it with a table but i dont know if it is possible to edit the table: Code:
Help On Editing PHPBB
I do manage a website and it includes a PHPBB forum, obviously placed at /forum (¿why to use a weirder path? :P). The thing is that my site is more than a forum, it has more content. I have menus almost everywhere, it's very navigable; but if you go into the forum, you can only get back to the other sections of the site using the back buton or removing everything starting from /forum in the address bar. Of course, this doesn't fit my site's philisophy, which is almost to put menus even inside the menus in every page, so you can go from everywhere to everywhere... I hope you cacth it. I've noticed that it shows the domain and title I put in the admin panel. Well, what I'd like to do is to make this text link to my homepage, placed at /index.php or simply /. The problem is that I'm completely lost when trying to do something in PHPBB's source files. I don't know which file should I edit, nor where should I add the code. These files are a code labirynth for me, and I need to edit them to fit my site's needs.
Looking For A PHP App For Editing Pages
Any ideas? Basically something that would allow me to upload/copy/delete/edit webfiles. It would probably use a WYSIWYG javascript editor. Not really looking for a CMS because they don't work with existing html files.
Form Editing
I am trying to call information from a MySQL database in for form of an editable form. I want the info to be called into a box that can by typed in and so far that works. What I want to do next is to be able to change what is in those boxes and click an update button which updates what was called from the database to what I typed in the box. The code I wrote is below and almost works. I'm not sure what the problem is. Code:
Drop Down Box Editing
I have 3 linked drop down boxes ( Eg: Country, State and City ) . I've set values for the drop down boxes initially and I would like to edit the values later. Is it possible to show/highlighte the set values ( the value I've put earlier ) while editing the drop down boxes using PHP or AJAX.
Editing A Table
i've checked my code like a thousand times and it seems to me there're no syntax errors in it, but I still don't manage to get the damn thing working. It's a script to update an event stored in a db, you can edit both the description as the date of the event. Code:
Editing A Row In A Table
I'm having trouble editing a row. The existing data echoed into the form ok but if I try to change anything and click submit, the error message at the end of the script is echoed. Code:
Editing System Passwords With Php
I need to create a php script that adds new users to my FreeBSD server. I've tried running the 'pw adduser' command through a script, but I can't pass a desired password to it. I've also tried using the pw command with a password encoded in md5, but I'm still pretty confused about how the encryption works.
Editing The Win32 Registry
Does anyone know if the equivalent of PERL's Win32::Registry module exists for PHP anywhere? If so, I'd be grateful for a push in the right direction.
Editing An Element Within An Array
I have a two-dimensional array that looks like this: array( array(0, 123), array(0, 234), array(0, 345), array(0, 456) ) I want to REMOVE any element that contains 234, and I want to INCREMENT the first value for any element that contains 345, to make it look like this: array( array(0, 123),...
Editing Files In A <textarea>
I've written this program to let me edit ASCII files on my server in a <textarea>. However, if the file that is being edited contains a textarea within it, then I get problems. what I want to do is read this file into the textarea but I want to convert all of the < and > characters to < and > 's. I figgered you'd do this through Regular Expressions: however these are poorly documented in the PHP book I have, though the Perl book I have tells me how to do this. Could someone tell me how to do this, IN PHP! Code:
Editing Mysql Db Using A Php Form
I am working on a Sig Request database. People submit their request using a form and it's posted into a databse and then displayed beneath the request form. This is working fine. I am having trouble however with my edit.php file. I want to be able to load a users information, which I have done using this code below. It displays in a form. I change 1 or 2 of the fields, such as the completed field and designer field and click update but it doesn't actually update the database. The page first lists all the requests. It lists their ID, Name and then it says "Edit this Request" which opens a page with their sig request details in. Here is my code below for the edit.php file. Code:
Editing Multiple Records....
Im trying to make it so that I can sort fo like edit all teh records in a table from one page, and im thinking have it like this: Field 1.........Field2......Field3.. Record1..................................Button to edit the info in this record Record2..................................Button to edit the info in this record Record3..................................Button to edit the info in this record Record4..................................Button to edit the info in this record
Editing HTML In A Form?
I want to build a very basic online text editor, to allow customers to modify their own sites' html content using a simple form with textarea element. I read the HTML file like so: <?PHP function EditText ($filepath) { if (!$file = file($filepath)) return false; foreach ($file as $line) { $value .= $line; // contains all text in file when done } $html = "<html><head><title>Editor</title></head> <body> <form method='post' action='processtext.php'> <textarea rows=ཤ' cols=ྌ' name='txt' value='$value'> <input type='submit'> </form> </body> </html>"; echo $html; return true; } EditText ('/sample/index.html'); ?> The problem comes when the parsed file containing html elements itself is echoed to the browser. In itself, PHP does what it's asked, but all browsers I tried choke on the contents of the TEXTAREA field. Best example may be: try parsing the file containing the script itself, it becomes a real mess. I tried htmlspecialchars, this did not fix it. I tried addslashes to only escape the quotes in the parsed file, also no success. I saw one example online where 'they' preg_replaced about every possible (x)html and php syntax element, resulting in an immensely large and slow script. Can't imagine that's the proper way forward. If at all possible I'd like to stay away from Javascript. Any idea if this is a realistic approach? Are there any useable scripts available? I searched google a lot, but I keep ending up at sites that offer html or php editors for local use, not in a browser.
Editing ID Field In Database.
I have come across a problem with some coding work that i am doing. My problem is the following: Presenters in the radio station, are shown in order of ID. What i want to be able to do, is edit the order in which they are shown, by editing the ID. My problem, is that when i process the form the script has no way of telling what the field names are, as they are not pre defined, because i have put the code in a while loop, to get all of the DJ's names & id's out. Code:
Editing And Updating Text
I'm trying to create a text editing and updating capability to help someone who wants to maintain content on a web page without having to know any HTML or use a web authoring tool and FTP'ng the contents. I've already created a screen whereby the person can create new content with a PHP program that inserts into a MySQL table. But, I'm having a little trouble in creating the edit/update functionality. I created an edit screen called "teach_edit.php". Based upon some search parameters on another HTML screen, it retrieves the appropriate text from the database. It seems to allow on screen editing. However, when I hit the Submit button, nothing happens. It's supposed to call another program called "teach_update.php". Here's the code for it. <HTML> <HEAD> <TITLE>Teaching Edit Program</TITLE> </HEAD> <BODY> <?php @ $db = mysql_connect('localhost', '<db name>', '<password>'); if (!$db) { echo "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db("<db>"); $query = "select * from albert where ".$searchtype." like '%".$searchterm."%'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $title = $row['title']; $teaching = $row['teaching']; $teaching = wordwrap($teaching, 60, " ", 1); $teachnum = $row['teachnum']; } if ($result) {
Good PHP Editing Program
could someone suggest a good PHP editing program? I have been using GoLive - I'm sure there's something better out there.
Deletion And Editing Of Modules
i'm creating a miniature CMS. At the moment i'm working on the creation/deletion and editing of modules. I've got the creation working. But i'm struggling on the deletion and editing. This is what i was thinking: [Deletion] 1. (ID) Module 1 [Delete] (Link: modules.php?do=delete?name=Module%201&id=1) [Editing] 1. (ID) Module 1 [Edit] (Link: modules.php?do=edit?name=Module%201&id=1) How would i make it so the URL was that?
Editing MP3s Dynamically
I'm trying to work out if there's a way of using PHP to dynamically edit an MP3. Is this a bit too much for the old PHP to handle? I just want to cut it down to 10 seconds of audio if possible.
Editing Posted Bulletins
I have a section on my church website that pulls announcements stored in mySQL and displays them with PHP. I recently started working on a control panel so that other people could login and edit/create the announcements so as to keep it up to date and lighten my load. I use a while statement to display all of the bits of news but my question is how can I make an edit button specific to each row in the table on mysql? All I need to really be able to do is have an edit button spit out for each post that will set a session variable to that particular posts index number. I created the mysql table with this in mind and have index numbers to reference the chunks of data.
Editing A Users Profile
on my site the users can edit they're profile, basically a page with drop down boxes, they can change country etc, what i was wanting to do is when they goto the edit page to edit say they're country for example , the country they signed up with is pre-selected (if someone signed up with Scotland) Scotland is automatically shown first. Code:
Editing Account Problem
Im working on a script for users to edit there account here is what im using on the checking to make sure the username or the email doesnt already exist. However its detecting there username and email if they leave it the same. Here is a snippet of code that I am using Code:
Editing MySQL Database
I've got website running happily using XAMPP 1.4.15 However, I desperately want to upgrade to the latest XAMP 1.6.1 The problem I'm having after the upgrade is with a php page that lets me edit users. I can add users ok but if I try to edit them, all the cells in that row end up empty. There's no error message which makes it difficult to diagnose. At first, I thought the reason was due to the new XAMPP having MySQL 5.0.37. I upgraded XAMPP 1.4.15 to MySQL 5.0.37 and it still worked perfectly. There's something in XAMP 1.6.1 which isn't compatible with my php code. I even tried XAMP 1.6.1 with PHP 4.4.6 but I still had the same problem.
Getting Data From A Txt File
Get data from a txt file, and say that the first 8 characters are the id, the characteres 9 to 17 are the date.
Editing Colours In Existing Image- How?.
I'm having a little trouble finding out how to edit the colours of an existing image and output it through php. For example, if I tell it to read an image in a folder but change X colour, how would that be done? The only ways I've discovered so far involve images made there and then, on-the-fly, not existing files.
Editing Submitted Form Using Variables
I'm working an e-mail form for my web page. I want people to be able to fill out information and when the click submit, get a page that basically says, "Here is the information, is it correct?" Then they can click either, "Yes" (and it sumbits), or "No", and it goes to another page set up like the form filled out the first time, and grabs the variables and places them in the "values". This is the code I have so far: Code:
Script For HTML Editing In A Browser?
I'm looking for a simple PHP-based solution that pulls a whole page or tagged snippets (something like <!-- EDITABLE>Edit me<!-- EDITABLE_OFF>) into a HTML form, allowing non-technical users to udate pages from their browser. The only "extra" required would be a simple password protection. Flypage (http://www.flypage.com) does this, but at $199 it's too expensive for the small project I need this for. Does someone know about free or shareware solutions? I have the impression that this shouldn't require a lot of code if you don't need fancy site and user management ...
Editing A Post In Character Replacing. Is This Possible In PHP?
I want to be able to strip any character that is does not appear in the following list from a text string: $LegalChars=""!#$%&'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"; And conververt the following: £ to £ € to € ‘ to ' ' to ' " to " " to " • to • So, if the input string was: $Input = "Andrés says "...the € is very useful""; The out at is generated is: $Output = "Andres says "...the € is very useful""; (I've marked the changes in red above)
Editing/Viewing Flat Files
I'm making a simple events listing; where the user logs in, adds events (in fields, pull downs, textarea, etc) and then posts it (via a flat file). Now, first question, how do I make it so tha the characters (such as ' or ") display without a / next to them (I'm sure it's a string command, not sure which one to use). Second, how can I make it possible for them to view inside a textarea and edit, but not have it show the HTML code that is generated by their creating the event (their field entries are nested within tables, etc). Is that possible via some sort of find and hide thing (I don't want them to see the <table><td>, etc tags, but I don't want those tags to disappear when they want to edit their events).
Editing Mysql Database Row With Select Box
I have a small site, this small site has a few categories, now I can add items through my online admin area fine and delete them fine, but when it comes to editting them I am having some trouble, everything is working fine except the category column, because it is a drop down box I do not know how to have the category selected during the creation progress selected all the other info is loaded.
Editing Multiple Text Elements
I'd like to edit multiple rows with one click by the user. Basically I'd print out <input type=text name=fieldname value=$value> for each record in the table. When the user clicks submit PHP will then loop through each row updating where necessary.
|