Edit Delete Form And Quotations
I have a form where I add a lot of ' and " for feet and inches into MYSql and most of this works fine except when I go back to the Edit/Delete Form.
It stores the ' and " in the database, reads and outputs the ' and " on my page but when I use the edit/delete form it cuts off at the '. Is there a simple solution to this on an edit/delete form ?
View Complete Forum Thread with Replies
Related Forum Messages:
FFDB Edit And Delete
I've got a news program that you can upload the new news via a form, puts the data into a text file etc. I'm trying to find a way to delete certain lines from the txt file and to be able to edit them. I've played around with a few things but i just can't seem to get anything close to what i'm after. I've looked around the web but all i can find is like "open the file > put into array > do what needs to be done > write back to the file" which isn't exactly that helpful. Could anybody point me in the right direction as to how to do this? maybe with a better description/example? =D
View Replies !
Database Update/edit And Delete
i have spent the last few days trying to create a simple script to add/edit and delete entries in a mysql database with php. i have 1 database with 40 tables, each table has 3 fields (id, header and body) i created an input page with input fields for header and body. the table to store the information in is selected from a drop down menu. all this works fine. for some reason i cannot get the edit and delete page top work at all. would someone mind taking a look at the code and let me know what i am doing wrong? Code:
View Replies !
Define Files For View/edit/delete
I am working on this little file manager project, I know, there's lots out there. However, I couldn't find one that paged the results that didn't use a DB. Now that I have it set up (works great), I'm not sure how to define the files and not mess up the paging - so that if it's a folder you can open it and work with the files, a photo you can view or delete it and if it's a .txt, .php. etc. you can edit it. Code:
View Replies !
Simple Login Page To Delete And Edit Things In Mysql Database
How do I build a simple login page on my site? I need a way to login to my admin area in my webshop, so I can add, delete and edit things in mysql database. I don't need help with add, delete and change things, only the login thing. The users should not even know that there is a admin login page. The users don't login to shop, they just shop so I can't use the user login page because there is no such page. Can someone please give me some guidelines for this?
View Replies !
Quotations
I sometimes have to print the html but quotes in the tags come up as errors when I view the page. For example:print "<td width="100%">"; The quotes around "100%" come up as errors. I know I can use single quotes, or no quotes at all, but is there any way for me to use the double quotes?
View Replies !
Edit Form
I have a php form that displays information from a database based on a mysql query. Four of the form fields are images that are stored both in the db and in a folder on the host. What I want to do is to be able to update the images in each of these field, for example, click an update button that allows you to reselect a new image when submitted this would delete the original image and replace with the new. I know how to unlink the file to remove the images but cannot find a way to do what I need.
View Replies !
Edit A Form ?
i have a form.in which user input there information. now when user click on submit button it will open conformation page if user found some mistake then user can edit there information. what i want is that when user click on edit button 1st it will redirect to main form page & then automatic fill all information which was filed by user.
View Replies !
Quotations Problem
I have an email address which is submitted to a page, this is then put in a hidden variable as follows: <input type='hidden' name='email' value='<?php echo $useremail; ?>'> The problem arise when I have an email with a name with a quotation in it e.g. test@o'test.com this will appear in the hidden field as test@o'test.com. I then want to check this email address against a stored email in the DB, which is stored as test@o'test.com. However when I submit the form above, the $email variable contains only test@o and nothing else. Can someone tell me how to get the correct value to my function which will check the email?
View Replies !
Edit XML Like A DB Woth Web Form?
I have a site that takes info from a form and adds it as a record to an XML file (RSS format), using the XML as a light-weight db. Now I need to build a web-based management app for the data in the XML file, where the user can grab a record from the XML file, edit it, and save the changes back to the XML file....
View Replies !
Edit XML Using Html Form
I have simple XML: <myXML> <t1>My main Title</t1> <t2>secondary title</t2> <content>All kinds of good content</content> </myXML> All I want to do is make a simple CMS that can update the content inside the 3 inner nodes. I don't need to change, add or delete nodes. I thought of echo-ing the content to 3 html form inputs and fwriting to a new XML file to overwrite the old one using post method. Does this sound correct in theory? Does anyone know of an existing example of this method?
View Replies !
Edit Profile Form
on my site the users can goto the control panel and edit there profile (age,location etc) from input boxes and drop down boxes, but if i just for the heck of it press the "update profile" button WITHOUT putting in the correct data it is all lost (no input in the input boxes defaults to zero in mysql) what would be the best way to only update mysql when the user input the data, i have attatched a screencap of some of the fields Code:
View Replies !
Edit Form Validation
i have an edit form which as a validation code to check if the new parent category/subcategory is not yet existing in the database. apparently only my parent validation code is working, but my validation code for the subcategory is not working. Code:
View Replies !
Edit Images In Form
I am trying to perform an update on the four image fields. When you select the image it works without a problem. The problem is as follows: If for example you only wanted to update image one, the selection of the upload works without a problem and it posts the filename to the database, the filename for image one, two and three is changed to array. I have tried loads of things and cannot get around this. What I want to do is basically if only image one is selected for update only that field is updated and the other 3 are left as they are.
View Replies !
How To Create An Edit Form
<?php // check if id is passed to this routine if (isset($_GET['id'])) { // if yes: remove harmful tags and save the passed id in variable $id $id = strip_tags($_GET['id']); //required file for database connection require("config.php"); echo "<table border=Ƈ'>"; // construct SQL statement $sql = mysql_query("SELECT *FROM iteminfomation WHERE ID='$id'"); $sql1=mysql_query("SELECT NameOfTools,Brand FROM listofitem WHERE ID='$id'"); $information1=mysql_fetch_array($sql1); $information=mysql_fetch_array($sql); echo "<table border=Ƈ'>"; echo "<tr><td >NameOfTools</th><td >Brand</th><td>date</th></tr>"; echo"<tr><td>{$information1['NameOfTools']}</td> <td>{$information1['Brand']}</td> <td>{$information['Date']}</td>"; echo "</table>"; }
View Replies !
Edit Form With Combobox
I've created a form which include text field, radio button and comboboxes. When user needs to edit the form, it will be loaded with the current values, and user can edit it by changing those values. The problem is: If the changes is within the combobox, the value selected will be as per the selected one. But if there are no changes within the combobox, when user click submit, it will only save the first word from the combobox. Below is the coding that I've used: <tr> <td><strong>Person In Charge (PIC):</strong></td> <td width="31%"><select name="pic" onChange="showValue_pic_others();"> <option value=<?php echo "$row[pic]" ?> selected><?php echo "$row[pic]" ?></option> <option value="Dr. Marina Tan">Dr. Marina Tan</option> <option value="Ms Amy Masni">Ms Amy Masni</option> <option>Others</option> </select></td> <td width="33%"><div id="pic_others" style="position:relative; z-index:1; visibility:hidden; width: 117px; height: 21px;"> <input type="text" name="pic_others" id="pic_others"> </div></td> <td> </td> </tr> If I didn't edit this combobox, the value that is submitted by the edit form will be the first word "Dr." for "Dr. Marina Tan" and "Ms" for "Ms Amy Masni".
View Replies !
Form To Edit MySQL
i have a script to update (edit) entries in a MySQL databvase that i got from a mentor: it loops through every field in a specified row number and prints it into a pre-populated form. The problem is this that i don't want to display every row the same way (i would rather display a photo than it's name, and for a larger text field i would like to display the text in a larger text box). His solution seems pretty smooth : "foreach ($dd as $field=>$value)" my thought was to do a case switch, but i don't know how to set that up, any ideas?
View Replies !
Edit Form Page
i have a edit form for my brand items and one of the items that i may need some alidation is the brand name. my problem is, i need a validation code for the brand name, wherein if the brandname was changed it will execute this validation to check if there is already an existing brand name but if the brandname was not changed it will not execute this validation code. currently this the validation code that i am using: $sql_brand_name_check = mysql_query("SELECT brand_name FROM engsoon_brands WHERE brand_name!='$brand_name' AND bid!='$bid'"); Â $brand_name_check = mysql_num_rows($sql_brand_name_check); Â if($brand_name_check > 0){ Â echo '<script language=javascript> alert("brand name already exist.<br>use a different brand name!");top.location = "brandsmngr.php?id=3&bid='.$bid.'";</script>'; Â unset($brand_name); Â exit();
View Replies !
Edit Form For MySQL
I have a php form that encodes the responses to various <Select> field drop down menus as numbers (e.g. 0 to 50), and then posts the data to a MySQL table. I am trying to implement a form to allow editing of the data already in the table. I can read the data out of the database without trouble, however I am having trouble figuring out a way to have the appropriate option in the <Select> fields chosen to reflect the data already in the database.
View Replies !
Form Submit - Adds A Delete Button To A Form
I have a line that adds a delete button to a form and I have an onClick procedure that confirms if the user wants to delete an article, how can I use PHP to code a statement so if they click OK it deletes the article from the database? Or have it link to a page like events.php?do=delete or call a function? Or do I absolutely have to use javascript? Here's my code: PHP Code: $delbutton = '<input type="submit" value="Delete" name="delete"%s>' $jsconfirm = ' onclick="return confirm('' . $LANG01[39] . '');"' sprintf ($delbutton, $jsconfirm);
View Replies !
Form To Edit Html Code
I have a html page with tables and cells. 9 cells with text in them with "onclick=MM_setTextOfLayer" for each name in the cell/tables. And I need to make an php form that will change the name in one of the 9 designated cells/tables (by choice) and the value of the onclick in the src code. And over write the old stuff.
View Replies !
Creating A Direct Edit Form
I want to setup a form that will put the field data directly into a webpage. I figure the script I need is similar to a forum script, but I can't seem to find a good one. Plus, the tutorials on forums at phpfreaks have been removed. The idea is to allow users of the site who are not code-savvy (or do not have Dreamweaver) to contribute (ironically the name of the software that allows this).
View Replies !
Edit Form Not Displaying All Info
I have an edit form when I run the query in SQL all the information is displayed when I run it PHP the first word then nothing shows up. For example if the data in the field says : 2569 Nutley Street when I run it in PHP it only displays 2569 and nothing else. Code:
View Replies !
How To Edit An Entire Table Using A Form?
Currently I am able to create forms to update a mysql table. I can display information from my tables no problem. I have since been trying to figure out a way I can edit mysql entries for a table on one page. Say I have a table with the headers 'id' 'header' 'url' 'content' in a table called 'news' How can I display all the rows from this table in a form that can be edited and re-submited. I would also like to be able to delete entries by ticking a check box next to that entry. So I could in one go select 2 or 3 for deletion and update others and have it all update the database with one submit button at the bottom of the page. Code:
View Replies !
Edit Form Using Drop Down Boxes
I have a form that uses drop-down boxes to save information to a MySQL database using a php script I wrote. That works fine, but the problem comes when I am trying to edit the information in the database. I have an "edit form" that pulls the values from the database and displays the fields in the fields accordingly. I am having a hard time figuring out how to populate the drop-down boxes with the value from the database. I want the "option selected" tag to be the database and be able to still have the rest of the options to select from.
View Replies !
Select List - Edit Form
For a couple of days I have been trying to make an edit form that remembers the initial values a user entered. The edit.php page has a few textboxes and a few dropdown/select boxes. The textbox part works fine and comes from a database. Code:
View Replies !
Edit Form, Data Not Re-fill
im doing a edit profile page. the page would pull out data frm mysql and populate the forms respectively. user will edit and update their profile. The page would then validate the value in the form. if there's an error, it would prompt the user. when this happen, the form do not retain the newly entered value but instead re-display what is pull out from the database.. how do i retain the newly entered value in the textbox? Code:
View Replies !
Problem With Quotations In Text Fields
I'm new to PHP & MySql and have run into a problem when retrieving field data from MySql and inputting it into a Text field for editing and updating in the database. The inputted info has href/jscript popup window code in it. The problem is the quotation marks in the HREF interfere with the quotation marks in the Text Field. ie <INPUT VALUE="<a href="#" onClick="etc.. The returned code in the Text Field gets cut off after href= because the Value parameter is closed by the " of the HREF.
View Replies !
Question Mark Instead Of Quotations - Addslashes()
For some reason, the first time I used it it worked fine... But now, I am trying to use it again, and whenever I submit a double or single quote it replaces it with "?" I have tried experimenting with htmlspecialchars(), htmlentities(), and addslashes(), by using them up in the $_POST['var'] area, like so addslashes($_POST['var']) and doing the same with htmlentities and htmlspecialchars Nothing has worked. Here is my origninal code that worked the first time I used it...
View Replies !
Input And Output In Same Form With Edit Facility
i am using MYSQL with php. the databse is containing the deatils of the stock of each supplier. i want to update the stock so i will enter the name of the dealer.i should be shown the existing stock and from ther only i should be able to edit the stock to update database.
View Replies !
Add/edit Combo Form--opinions Wanted
I would like to use the same form for adding new records and editing existing records. New form values are contained in $_POST. Database values are contained in an associated array. It seems to me that in order to use the same form for both tasks, I need to assign the form field values to page variables. The flow might look something like this: if $_POST $variable1 = $_POST['field1']; $variable2 = $_POST['field2']; else if $rows $variable1 = $row['field1']; $variable2 = $row['field2'];
View Replies !
Encrypted Passwords And User Edit Form
rather than just storing my user's passwords, i store an MD5 hash instead. $sql = "select * from users where user='username' and pass='" . md5('password') . '"; what i'm wondering is how to handle the user edit page where an admin can update a user's information. if i put a password input field on the form, i cannot pre-populate it with the password because i literally do not know the password. should i just leave it empty and only change a user's password if the admin actually enters something in there? that worries me a bit because my admins might not be the brightest folks and it might confuse them.
View Replies !
Query Strings - Edit The Topic And Submit The Form?
I am creating some custom php forums right now, and I need some help with query strings. In the forums, when someone edit his own post, I set the following query string: "address.com/topic.php?t=123&control=edit" Which opens a text area so that the user can edit his topic. Now when the user edit the topic and submit the form, the address stays: "address.com/topic.php?t=123&control=edit" But I want it to change back to: "address.com/topic.php?t=123" without the 'control=edit' part.
View Replies !
Mysql Delete From A Form
i'm trying to find out how to get this to work. You type in a name of a record in the database and it removes it. In this case it's deleting the record that when you type in the name of the server it looks for it in the column "servername". You type in the servername and it will delete the whole record. Code:
View Replies !
Delete Buttons On Form Not Working
i have the following script at the top of the page and the form below on that same page. it works in Safari and FireFox on both PC and Mac. However, in IE the page just reloads and nothing gets deleted. Any suggestions? Code:
View Replies !
Strip Slashes - "edit" Information In A Form
I have the strip_slashes and add_slashes working well on different pages. However, on this particular page where one can "edit" information in a form, the following code fails. How does it fail? Well, in the form generated by the following code, only text without quotes and slashes displays. That is, if there is a row in the database like: non quoted text -- it displays in the form without trouble. But, if there is a row of text in the database like: quoted "text"  -- it displays only: quoted The quoted text is dropped completely. Code:
View Replies !
Quotations Problem With Echo("") Command
Running php4.3.6 What i'm trying to do is exactly like the weather channell site when you click in the zip code box the text dissapears and you are free to type your zip. I can make it work by using this command: onfocus="this.value=''" but i want to generate the string with php by using the echo("write something here"); command. Obviously the problem here is the double_quotes i need are screwing up the command.Have tried using special characters and adding slashes. which both work to a degree. The page doesn't bomb but the onfocus still doesn't function. wtf how do i make it work?? time is 6:31pm Central
View Replies !
How To Prevent PHP From Adding "" To Quotations
I have a form, and when I enter something with quotations, like: I am a php "newbie" Somehow when I extract that content using PHP, the end result is always: I am a php "newbie" How can I stop it from adding the backslash to the content? I tried a regular expression like: $stuff=ereg_replace("","",$stuff); to search and replace "", but it gave me an error.
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 !
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 !
EDIT CSS
i need a script that will allow my to edit the css file through a website. Like without going through the cPanle I could just click a link throught the site and it will allow me to edit it.
View Replies !
PHP Edit Itself?
Can a PHP script edit itself? And if so would it be faster to store/retrieve information this way instead of using a database? Or would it be slower?
View Replies !
Hex Edit
If you open up a .doc file in a hex editor, you can change the values of the text without corrupting the document. How could I mimic how a hex editor reads and edits a file in php?
View Replies !
Edit MySQL Using PHP
I know that I need to include a textbox and everything, but dont know how. In my database I would like to be able to edit it from my website that has a textbox and a button that allows it to change a field in the database and replace it with the text in the box.
View Replies !
Trying To Edit A Txt File
Hi I am trying to edit a text file... the format of which is like #####abc.conf poll somethin proto pop3 via 127.9.02.1 user "me@me.com" pass "dell" is me.nutcase preconnect "abc abc abc abc" ## poll ak # proto pop3 via 11.11.22.33 user "ak@bk.com" pass "eatme" is nutter fetchall preconnect "abs -e -f -f /ss/ss/ " ## The way i am tryin to edit this file is .... <?php $file = "/som/thing/abc.conf" $dele = "poll ak"; $open = fopen($file, "r+w"); $read = fread($open, filesize($file)); $sep1 = explode($dele, $read); $sep2 = explode('##', $sep1[1]); $read = str_replace(array($dele, $sep2[0]), array("", " "), $read); fseek($open, 0); fwrite($open, $read); fclose($open); The result of what happens is it delete the tag from poll ak till the ## but also adds some text at file end like .... Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2Resource id #2defaults via 11.11.22.33 user "ak@bk.com" pass "eatme" is nutter fetchall preconnect "abs -e -f -f /ss/ss/ "
View Replies !
Edit Profile
I would like the user to edit their own profile. But how can I retrieve the data in the form to perform update, instead of display as the code below? PHP Code:
View Replies !
|