Post Edit System
I'm trying to work on my edit system on my site, after realising that a separate edit box wouldn't be possible under each message if the user had pressed edit on that post I decided on doing what all modern forums do, use a separate page to edit the corresponding post.
So far I am using <a href='?action=edit&id=$row[id]'>Edit[/url] under each post which works fine. I've got it displaying a edit box at the bottom of the main news page(index) but it's a little far away right down the bottom of the page. How can I do it like this forum and many others do?
View Complete Forum Thread with Replies
Related Forum Messages:
Build A System That Allow The Admin To Add & Edit Pages
I'm trying to build a system that allow the admin to add & edit pages (not real pages - using mod_rewrite to fake pages), and give the admin the possibility to add "sub folders". Another thing I need to implement is a menu with some relevant links: - In every page, I need to display links to top-level pages (pages with no "parent"). - In every page, I need to display links to pages that are "sons" of the current page. The things I can't figure out how to solve: Code:
View Replies !
Dropdown List Which Selects A Post A Title (to Edit)
I want to have a dropdown list which selects a post a title (to edit), then when you click submit I want to use POST to submit the data for that post (post title, username, subject, content) so that the edit pages form fields will already be filled with the posts data.
View Replies !
System(); Command Not Working On Remote System. Windows.
My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run: $last_line = exec('dir pythonc$', $retval, $g); print_r($retval); echo '<br>'.$g.'<br>'; echo '$last_line= '.$last_line.'<br>'; Which outputs: Array ( ) 1 $last_line= The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.
View Replies !
Login System - News System
i have to do a news system wich use php/mysql. i need 3 accounts: * a 'reader' who doesn't need to log in to read the news * a 'writer' who can write news in a pending news table * a 'moderator' which validate a pending news, and make it a regular news, viewable from the site (by the 'reader') This is a small web site, so i can't use SSL; and i use php sessions. Right now, i deal with account from a mysql users point of view, which means, that a 'reader' can access all the admin part of the site, but will ger errors when trying to read/write by sql query. I was wondering if somedody could give me a trick to deny access to the admin pages. Rigth now, i though about these: * by decoding mydql rights? (how) * by doing only-to-test query? (bad i think, especially for write right)
View Replies !
Post And Redirect With Post Data
The solution we have though up is the following: 1. The user fills in data in a form and hits submit - This submits (POST) to another page (redirect.php) 2. redirect.php adds more POST data to POST and then submits all this POST data to another page (offsite [payment portal]) The reason why we have to do this is for someone who knows our to read html source code, could easily find the sucessful page which will then do the processing we need to do on our side. Which means freebeis.
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 !
Read And Edit Xml With PHP
I'm trying to write some php that will read in some xml and then allow me to modify the tag and write back out to xml. In the following example, I want to read in 'text_for_paragraph_1', then allow it to be viewed, edited, and saved back to the xml... I have absolutely no clue even where to start...
View Replies !
Php Edit Xml File
I have an xml file that looks roughly like this: <?xml version="1.0" encoding="ISO-8859-1" ?> <videos> <video url="new.flv" desc="Guitar Solo" /> </videos> what i want to be able to do is add more entries like "<video url="new.flv" desc="Guitar Solo" />". How can I get it to add the entry into the right place, so it doesnt show up after the </videos>?
View Replies !
Video Edit
It is possible to upload your own video and then mix it the way you want. Is there available a php library for modifying flv videos to mix them and add effects just like in eyespot. I know for flvtool 2 but i am not sure it will do the thing and i couldnt find any documentation for it.
View Replies !
Allow To Edit Within X Hours
I have data that is inserted into a database, one of the fields is named 'time_stamp' and is a "datetime; 0000-00-00 00:00:00" type. I was wondering how one could make an if statement that will show code (code is just the editing portion of the page) if the 'time_stamp' is less than the 'time_stamp' + 72 hours. Other wise, don't show the code and inform them that they can no longer edit.
View Replies !
Edit Regarding Check Box?
I am trying to write a little script that when the user chooses to edit there ad on the site, it will display a list of there images as thumbnails. They then check a box for the images they want to keep. Is this the correct syntax? Code:
View Replies !
Edit Php To Html
I have a website on a cd and is in php format.How do i change from php to html?Or what program should i use so i can publish the website.
View Replies !
Dynamically Edit SQL
I would like to have my results of an SQL query populate a tabel, which i have already set up and is functioning well. However now i would like to have another page, where the informatino is editable. What do you guys think the best way to set up a table that a user can edit the information in a SQL database without entering PHPmyAdmin?
View Replies !
Edit Entries
I have a database which only has 4 fields in it. I want to be able to view all of the rows and then select one of the entries so I can update, correct any typing errors in the row. My database table is called entries and the 4 fields are id, date, title and entry. I only need to display the title and entry fields for each record. I can then browse through the entries and check if there are any errors in the text, if there is i want to be able to amend he errors and have it in the database correct. point me in the direction of a tutorial which shows how to acheive this or show me some code on how to do it. I know how to connect to a database so its just the edit/amend bits i need to know.
View Replies !
Edit Source
i want to click a link for and example link edit. then i want it to make me login after i have logged in i want to be able to edit the source of the page that i clicked edit on then upload my edited source code.
View Replies !
Cant Edit Rows
IÂ exported my database from mysql4 and imported it into mysql5 using phpmyadmin. My php pages worked and displayed all the data ok. However, I can add new rows but if I try to edit a row, the row ends up being empty.
View Replies !
Trying To Edit Column
I have an ID column at the beginning of my table. I want to edit it so that it's auto_increment and can support numbers up to 5 characters. The code phpMyAdmin tried to execute. SQL query: ALTER TABLE `books` CHANGE `id` `id` INT( 11 ) NOT NULL DEFAULT Ƈ' AUTO_INCREMENT MySQL said: Documentation #1067 - Invalid default value for 'id' So I set the default value to 0 but I again get the same error.
View Replies !
Edit Code
How do I edit the code at the following URL, so that it contains no functions, displays a code 39 barcode only, with a fixed width and height, displays as jpeg format only, and displays at 100% quality only?
View Replies !
Edit String
If I have a word that is all capital like: TEXT. Is there a way to convert this to: Text Basically I'm trying to leave the first letter capitalized and then lower case the rest of the word. Sometimes the string maybe: NEW TEXT. I would then want to convert that to: New Text. Anyway to do this dynamically?
View Replies !
Edit XML File
I have a FLASH Player that plays MP3 files on a webpage. The MP3 FLASH Player uses an playlist.xml to get it necessary information about name, title and .mp3 file location. In order to add, remove or edit my playlist, I need to download the playlist.xml file, edit it in a notepad application and than upload it again (together with the .mp3 files of course). How do I create a PHP script that reads the file and publishes it so that I can edit it or add tracks using for example forms. Anyone who has a great script or know where to get one or perhaps knows a great "walkthrough"?
View Replies !
Edit Browser
I would use PhpBuilder but I'm new with it, and I would know if there is a browser in the debugger showing the page like on the net. For example I build a form and I would debug them. I launch it and a window appears with the form like on the net I have put a breakpoint after the submit button, I fill the form and click it and th debugger go to the code and I can see mine variables. Then I click continues and the page reappears like on the net.
View Replies !
Edit Selection
I have a form that includes a dropdown menu that allows a user to pick and then is sent to mysql db table. I would like to be able to let the user go back and edit the info. I can echo back the choice the user made but how do you let the user choose again from the dropdown menu.
View Replies !
Edit Entry
I've accomplished half of what I want to do. I have an 'edit' link on blog entries and writing pieces for my upcoming site, and clicking it brings up the piece within a form so I can make changes. Now the only trouble is processing the form and having PHP and MySQL make the changes. I'm having trouble figuring out exactly how to replace or overwrite an entire string. I came across the Locate command, but I was under the impression it was useful to search for text to replace, not necessarily (or efficient) for replacing an entire string. Also, does the fopen command work with MySQL queries?
View Replies !
Edit An Array
I have an array that is all the files in a directory. <?php $dir = "../images/galleries/"; $dh = opendir($dir); while (false !== ($filename = readdir($dh))) { $files[] = $filename; } sort($files); print_r($files); ?> How would I -Strip off the . and the .. at the begining -Make it so that I can turn each one of them into a different link I used to be great at this stuff, but its been awhile.
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 Page
ok so I have a resutls page with records displayed from a search. Next to each record is an edit icon. Here is the code:
View Replies !
Edit/Update Db
I'm a complete newb and im not sure how I should go about the following: Retrieve data set from the db and display in a table - Easy enough Allow user to edit fields in table based on user credentials Update DB with contents of table The bit that im finding tricky is the editing of the table data and how to get this to my page to form the SQL statements.
View Replies !
Edit News
I personally think it's just my POST data acting up, but I don't know. The news is all held in a text database located at www.purplenum.com/database/news.txt. The Add News page in the Admin CP works perfectly fine, and is password locked with a non-debug password (You'll soon see why I say this). The Edit News page has a debug password of well, password. Here is the source for all of the enter the password, submit it, and you'll see what the problem is. The above files are all of the source files for the pages, maybe someone can see something wrong with it because I have no clue what is wrong. The reason I have a seperate auth page is because when I used auth on the top of my edit_news_post.php page it ALWAYS returned with an incorrect password. So I think this problem I'm having now is the result of a POST data problem.
View Replies !
Edit Message
Once my user has logged in I would like a welcome message to be displayed once the Admin has set this up. At the moment if the user logs in and there is no welcome message set by the Admin there is a message displayed "No welcome message set yet". However I need a button which is only available to Admins to create a message if there isnt one or edit the message if they would like to change something. I have created the code so that if the user logged in is Admin they will see the option Edit Update (this is just text at the moment, no link) Code:
View Replies !
Is .txt The Only Way To Edit Files?
When it has extension .php on my computer and I open it it goes to an apache prompt where I cannot type anything else in. When I change it to .txt it allows me to modify the code. Is this the only way I can modify .php coding?
View Replies !
Edit Record
What is the best way to edit a record in my PHP without passing the $id in the url. I have a multi user database and i dont want one user to be able to change the $id in the url so they can access records that do not belong to them.
View Replies !
PHP To Edit Files
I'm looking at creating a website that basically saves times and dates and emails specific people (all taken from a mysql database) when times have passed. I suppose something like a birthday reminder site, but not quite. All I'd like to know is: Is this possible and how much of an undertaking is it to get the emails out at specific times, instead of run as a batch at fixed times from a linux cron script.
View Replies !
Edit Submission
I want to make an edit submission page, so I did the following, for editsub.php: Code: <?php if ($_SESSION['username']){ $sql=mysql_query("SELECT * FROM `portal` ORDER BY id DESC LIMIT 0 , 200 ") or die(mysql_error()); while ($row=mysql_fetch_array($sql)){ $i++; $id=$row['id']; //Id $title=stripslashes($row['title']); //Title $author=stripslashes($row['user']); //Username $small_image=stripslashes($row['small_image']); //Small icon to go with the submission ........
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 !
Edit TXT File If Script Is Not There.
I want this script to instead of saying you're a guest, into deleting a line in a TXT file. Is this possible? Below is the script I'm using. if(stripos(file_get_contents('http://www.othersite.com/page.html'), '<script')!== false) echo('You're an affiliate.'); else echo('You're a guest.') also is it possible to "search" for a tag or something in the text code and delete it?
View Replies !
Edit All_url_fopen In Runtime
Currently in PHP, you cannot use ini_set() to edit allow_url_fopen during runtime. Has anyone found a workaround or has any other ideas so that I can use fopen() and file_get_contents() on a file hosted somewhere else?
View Replies !
Script To Edit Players
i have a (mysql) table called "Players" where I store First name Last name and Category. For adding players I use a dynamiclly create a dropdown menu from the table Category. My question is: In the edit player page I want the selected option in the menu to be selected <option selected value="">?</option> For the value I put the value stored in the Players table, but how do I also get the category name where I put the "?", Do I have to do a new query or can I add something to the existing query? PLEASE HELP :-) I`ve included a part of the script below. Code:
View Replies !
Dir Read / Write / Edit
I have some files in web server in a dir (e.g. /download/*.*) I don’t want any kind of database support. Objectives: - I want to upload files in that dir. - I want to see all files in that dir. - I want to delete/Edit the files. - I want to download the files. - When I click download the files, In case of Image files (or, any file types that the Brower can open) it open automatically open in to that window (But I want it to download only)..
View Replies !
Program To Edit Php Online
im looknig for an easy way to edit the script so i dont have to ftp download and upload files manually (maybe a program that when you click open on it it downlods the file via ftp then when oyu save it it uploads it again) and i need to be able to search throguh several files at once for phrases. for instance ill see a function being called in one file but the function is defined in a different file and i have to hunt for it very annoying. id like to jsut say "search all these files for this sting of text" (something i can do with context if anyones used it before just these files are located on a remote machnie).
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 Apache File On The Fly
I would like to know how to read my apache conf file and for each domain put them into form fields. also would it be easier to keep each virtual hosts in their own files and is this possible? PHP Code:
View Replies !
|