Deleting Posts
How can I delete my previous post? It's showing up in Google when I search for the url referenced in my previous post (if I put the name here, it will show this post, too). If I can't delete it, can I make it so that Google can't pick it up?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do You Do No New Posts/new Posts Function
On forums you have the little image at the side. Usually one is faded which means no new posts and the other is the same image but darker which means new posts. How do you go about logging when people have looked in a forum. Surely you can't have a table with an activity time for every forum as this would be imense.
Batch File Deleting And Folder Deleting
I have a folder in my web site where I used php to create and copy in files. but now I can't delete them easily. The only way I know how that is possible is through php. I get an error the following ftp error: 550 th: Permission denied I had the chmod() set to 0777 on every file and folder. But I still seem to loss control over the files when I try and do things with them through other means. I think it is because the user I use to access the files via ftp a diffrent user. So I tryed to add a function with chown() for the new files I was posting and uploading. It didn't work on those new files. so it looks like the only thing I can do is use the unlink() function which deletes the files fine. The only problem is now I have something like 100 sub directories all with files in them. I need to figure out a way to batch delete them. I can't find a script that goes through and finds all file contents including all sub directories and unlink those things. I found some that will use a for loop to list out the contents of a folder but it is just files. No sub directories. Any body got any ideas on which functions I should use or know where a script is that I can base mine off of. I am not sure how to approach this since what I tryed with chown and chmod has failed thus far. I currently have no code and am starting from scratch on this batch flushing of my directory.
Help With Getting A Number Of Posts
Hi, I've been trying to make a message board of sorts, and I'm having trouble getting the number of posts in each forum to show correctly. The two tables in mysql im trying to use in order to do this are a table called info, and a table called forumlist. Forumlist has two columns, one with forum_id, and one with forumname. Right now it has three entries, Test Thread, Game Thread, and Discussion Thread, with forum_ids of 1, 2, and 3 respecitively. In the table info, there is a bunch of columns pertaining to the author, the description, but those don't really matter, the one column that does in info is the column forum_id which is an integer I am using to keep track of which thread is in which forum. Right now there is only one entry in the info table, and that has a forum_id of 1. I have been trying to get it to show that there is one total post in the Test Thread, and 0 in the two others, but for some reason it keeps saying there is one in the Game Thread, and 0 in the others. I tried changing the forum_id to 2 in the info table, but then it said that I had one post in the Discussion Thread and 0 in the others. It seems to be jumping ahead by one for some reason. I could use some help, here is my code:
Unread Posts
I need to create an unread posts modification, and well I am not sure how to handle the unread posts. Should I store a cookie with an array (if possible), with the array containing all the post ids?
Latest Posts..
You know how on forum software they show the new posts, and then mark them as old.. how is this usually done? Is it via cookie, with all the ids stored in an array, or some other way?
Not Alling Html In Posts
I used htmlspecialchars thing to get rid of turning HTML in forum posts into actual HTML. But there is a prob cause nl2br() messes it up. It actually prints out the <br>'s... any ideas?
Refresh Problem And Posts
I have a problem with refresh. I have a contact form that sends an email when the submit button is pressed. I have a hidden variable and the code for emailing is only executed if the variable is set. The variable is cleared at the end of the code. All works as expected unless the REFRESH button is pressed by the user in which case the script is executed and the emails are sent once more. Debugging shows the test variable is set again even though it was unset before exiting on the previous run. How can this be? I know there are some things I could do like using database entries or cookies to hold the variable or even jump to another page which I do not want to do.
Using Arrays To Sort Posts
I'm trying to sort my posts so that they are grouped and seperated for every month. For example all december posts will be grouped togther and given a header with the name december, and etc for the other months. Code:
Form That Posts And Emails...
I have a script that is working for an individual to update a dog ad on this site I built. What I would like to have happen is not only for the data to post to the MySQL, but also for it to email me and tell me that someone has placed an ad. I know this is probably extra simple, but I am dumb. Please, if you could, just tell me how it would work in the script I have, what I need to ad where... Code:
Forum Posts / Sql TEXT
When ive ste the mysql table row to TEXT does this mean it will only read any saved data in it as text? just asking as i dont wish to have an sql injection leak in my forum posts. Currently i validate most the characters but ones like & , ' " ; i just default it to an error and dont save it in the db.
How To Prevent Duplicate Posts In My Guestbook?
I have a little form that people can post their messages, but there has been a lot of duplicate entries by people pressing the submit button twice or by hitting refresh. How do I prevent multiple posts of the same entry?
Passing Arrays Through Posts, Gets, And Cookies
I used to use arrays in input data that will be turned into a superglobal more often, but now that I care more about xHTML validity, I don't. Validation checking websites (particularly the W3C validator) yell at me for having square brackets in a name or id attribute. I started going the simple way of just separating what would be the array name from what would be the subscript with an underscore and parsing that out with PHP later. Is there a better, valid way of doing this that will have PHP set up my multidimensional superglobals for me as it would with the square brackets?
Preventing Double Posts On A Form
I get how it posts a random hidden form # on each page, and if its the same as the last submitted form(kept track of via session variable), it tells you its a double post (or you can put some code in to redirect to another page). I was also wondering how to stop pressing the submit button twice. i dont think this postBlock class catches that. My only guess is to disable the submit button, onsubmit.
Email Form With 2 Posts Actions?
I have an email form, and users can select to be added to our email list with a radio button, which is mailed to me in the body of an email. On a seperate page of my website there is a form where users can sign up for this email, and that form sends the data to en email administration program that is seperate from the email processing script. Is it possible to have a form that posts to both the email processings script certain data, and posts other data to the email processings script?
Losing Leading Blank Line On Posts
Hi. I'm finding that if I have text entered into a <textarea ...> </textarea> in a form, and that text has leading blank lines (with no spaces or anything else), that when I retrieve the entered text, I lose the leading blank line. Each time it goes through a post any top-leading blank line is lost. Only one- if I have several blank lines in a row at the top, only the first is lost. (If the top blank line has a single space, it's handled properly). Is this normal? When I retrieve, would using htmlentities to this? No other blank lines are effected, whether in the middle or the end.
Keeping Track Of Read Posts (forum)
I have created a forum system and I would like a way to mark forums as read. The problem is at the moment new posts are marked if they have been posted since the user last logged in, this leaves no easy way to mark a particular forum as read. This forum keeps track of which actual posts you have read does it literally keep a list of all the posts and when you last viewed it? Would this table in the database not be huge and require updating and writing to a lot, how else would it work. Maybe my system is wrong, does anyone have any other ideas on this. I would either like the ability for users to mark a forum as read or for the forum to keep track of which posts have been viewed.
Want To Display Number Of Views Of Blog Posts
I've seen a Drupal blog which lists the number of times a post has been viewed. I discovered that WordPress (my platform) has 2 such plugins, but they only feature the top 5 or top 10 posts. What I'd like is a list of the top 25, 50 or 100 posts. I don't care whether the data displays within the blog or whether only I can view it. One of the moderators at the WP forum posted this obscure reply which only contains this code: $results = $wpdb->get_results("select postnumber, cntaccess from mostAccessed ORDER BY cntaccess DESC LIMIT 1000"); Since he's not replying to any questions of mine, can anyone help me figure out what this code does, where it should be installed & how it would display the data within the blog interface? I also assume the "LIMIT 1000" should read "LIMIT 100?"
Right Button Click On Any URL Posts That Url To A Server-side Form
this isn't really a php question. But php is involved, sort of, and I usually get good answers here, regardless. I want to build a browser (perhaps as a firefox plugin) that, for any right-button click on any url on any page, posts the url to a server-side php form, that prompts for additional descriptive metadata and then inserts that link into a mysql schema. I know how to do all the server-side php/mysql stuff, but I don't know how to connect any right-click on any url (inside the client) as a post to my server-side URL. I can imagine this happening, vaguely, as a firefox plugin mechanism. Does anybody know of any how-to examples, that do something like this? Or is there an even easier, pure javascript way to do this?
Launching Several CURL Posts Without Waiting To Download Pages..
Hy there, ok, i`ll get to the problem: My php script has a function named curl(some curl options and instructions), it doesn`t matter that, what it matters: $var1 = curl("http://www.somedomain.com/somepage1.php"); $var2 = curl("http://www.somedomain.com/somepage2.php"); $var3 = curl("http://www.somedomain.com/somepage3.php"); $var4 = curl("http://www.somedomain.com/somepage4.php"); Ok, so it downloades the content of somepage_.php to the $vars, however somepage_s_.php contains several scripts which takes a verry long time for the page to download, so my script waits for each page to download, one by one, as line by line, what i would like do rezolve is to start the curl without waiting to download the first page, then the second and so on, it should start the download of all the pages at almoust the same time. That would be all, please help, i`ve lost 4 nights trying to get this fixed but no luck.
Prohibiting "refresh Posts"..
I've got a script. sort of a pop quiz working nicely.. the problem is that it's very easy to, as it is, con by refreshing the page.. thus getting more points. What I'd like to do is empty the $_POST (or $HTTP_POST_VARS) variable so that when refreshing the page that little dialouge box saying "The page you are trying to view blah blah..." I've tried: unset($_POST); and unset($POST['somevar']) reset($_POST); $_POST = ( bool )false; The problem is definetely work aroundable but.. well I'm getting a bit irritated and would like to solve this NOT using any cookies or java scripts or too much code.
How To See "New Posts" In A Forum Software
I'm working on a customized forum software, but I am wondering how best to make my forum display a "new post" image when there is an unread post by the user currently browsing. Confused by what I want? Basically I want something like what PHPfreaks has. It displays this image http://www.phpfreaks.com/forums/Themes/default/images/english/new.gif whenever there is a new unread post in a thread. How do the major forum softwares do it?
Deleting
how could i delete everything from a table in a mysql db except for the 10 latest things ?
Deleting All Files
Is it possible to delete all files in a folder using unlink() or something similar?
Deleting The Saved Db The One Before?
I made a script that backups the database as sql file in the server. I mean script writes it into the harddrive, but everytime when i execute the script the harddrive loss another 3 mb. How can i modify the script to delete the one before when i execute it to write the new one?
Need Help With Deleting Records
I'm trying to add a link on the display of a record to delete that record. The main part of the record is stored in pw_event, then there are several rating fields for that record stored in pw_rate, and there is also several records for the first record stored in pw_whois. I need to have a link that will deleted everything for that record in all three tables. Here is my display script: PHP Code:
Deleting Last Comma
The code below displays pet names like so: Fido, Bowser, Kittycat, Spot, and I want to delete only the last comma. I tried 'substr' and 'rtrim' and both of those delete the space and comma between each name, not just the last name as I'd like, so I end up with: Fido,Bowser,Kittycat,Spot, How would I delete only the last comma, so that it is this instead? Fido, Bowser, Kittycat, Spot Even with trim and substr, I end up with:
Deleting A Session
I want to be able to delete a session so that the next time there's a call to session_start, it creates a new session ID. I don't want to destroy the session variables specifically (though this will be a side-effect of what I'm doing) so I know that session_destroy isn't what I want to do. I presume I should just delete the session cookie manually. Is there a neater way? And if not, how do I do this?
Deleting A Director
I'm using this code trying to make ato delete a file or folder under w2k, apache. $direct=split("repadmin.php",$PATH_TRANSLATED); $file=$direct[0].$filedeleted; $filesys = eregi_replace("/","",$file); $delete = @chmod ($filesys, 0775); unlink("$delete"); header("Location:repadmin.php"); exit; but return this warning: Warning: unlink(1) [function.unlink]: No such file or directory in c:program filesapache groupapachehtdocsguonline epositorio epadmin.php on line 94 I checked the whole path and looks good.
Deleting Files
The below should delete files from a dir older than a week. I set the $dtime to 0 to test the script but it deletes nothing. What is wrong? Code:
Deleting Files
I'm using different files to store some arrays to make administration of a very small job-logger very easy. I currently read the file, remove the element to be deleted, delete the whole file, and write the file again without that element. Is there a way to remove a single element out of that file without deleting the whole file?
Deleting A Line
how do i delete from a text file 1 of the following lines jon|scott adam|smith <--delete paul|clark say i would like to delete the middle line of this txt, in member.txt what php code or logic would help me accomplish this? Also i am clicking on a hyperlink that is keeping count of the entries i have made. e.g php?record_id =1 php?record_id =2
Deleting A Record.
One last (hopefullly) problem I can't seem to get around for this program...why isn't this deleting the row i want? It does nothing. Now error messages either. HELP! $link = mysql_connect("localhost"); if(! $link) die("Could not connect to MySQL"); $database = "PC_Store"; mysql_select_db($database) or die ("could not open $database: ".mysql_error() ); $result = mysql_query("DELETE FROM inventorydata VALUES('$ProductID')"); The $ProductID variable is brought in from a menu choice on a diffrent page, it is also the primary of the table...so it should delete the whole row right?
Deleting Records
I've been trying to delete records since a week and i'm not able to do it. Before with this script, i was doing so many things at a time and i was confused.But, now, i just displaying the records from a table N trying to delete them.Would somebody pls guide me. I just wanna set the delete flag(i.e, i want to set the RBS_DELETE column to Y or something) when i check a check box to delete it. I've some 5 records displaying on my form and i want to check 3 of them and when i check them and hit submit, i want the RBS_DELETE column to have some value. PHP Code:
Deleting A Row From A Database
I can't fiqure out why my delete function isn't working. I have a listing of rows in my database with an option to delete an individual row at the end: Code:
Deleting A Message
I want a button to delete each message in you inbox wen clicked. im using this that doesn't work, because i coded it Code:
Cookie Not Deleting
login.php: setcookie('id', $userinfo['id'], time()+60*60*24*31*3 , '/'); logout.php: setcookie('id', '', time()-60*60*24*2); Any idea why it is not deleting my cookie?
Deleting Files
I'm trying to modify this script to remove files that end with %enlarged.jpg or %enlarged.gif or %enlarged.png, can someone help with the if statement, I've tried several things, of which, nothing is working: Code:
Deleting Folder
is there anyway of deleteing a folder and deleting all of its contents with it? i know that with rm_dir needs to folder to be emptied
Deleting The Pages!!!
I wanted the php files in my computer to be protected.If someone copies them and use in different machines,how can the php code find that the code is running in nextmachine. Is there any idea,that I delete the files using the unlink() method,when they are stored/run in next machine.
Deleting Using Checkboxes
im wanting to delete multiple things from a database using checkboxes, now i know how to use checkboxes in php etc. my question is would this be done using a basic while loop? i mean would i query all the things and then do while ($check_box == 'ON') { do the delete script } or is there something more to it?
Deleting A Line From.txt
it writes the line or lines to be deleted correctly into issues_deleted.txt which is line fwrite($file_contents_deleted, $value); and when it refreshes the line still exists in banip.txt it does echo out the line as well just doesnt remove it from banip.txt anyone know why? Code:
Deleting From Sql Database
I have used this script I made to delete files from a server and simultaneously remove information about the file from a database. I have uploaded the same script to a new website and it no longer works. The file does get deleted but the database line doesn't get removed. I can tell where it's going wrong by the error custom error message 'echo'ed on the page ("your file was only partially uploaded"), but I really don't know why.
Deleting Files
I have some script that takes an album id and deletes that album and the specific photos in that album. The code does run. The problem is that an error message i set to echo appears saying error deleting photo once the page automatically refreshes. When i check the image folder the images actually have been deleted. Code:
Deleting Elements From Arrays
I'm trying to delete empty elements (elements that contain empty strings) from the array with unset() function by looping through the array.
Deleting An Element In An Array??
Here is the problem: I've got an array with the following elements $array = ("ice","ice","polka","skate","polka"); thats 2 polka, 2 ice and 1 skate Now i want someway of removing just one of the polka's from it.. so that i'd be left with: $array = ("ice","ice","skate","polka"); what i did was a basic search with for loop and break Code: for($x=0;$x<sizeof($array);$x++) { if($array[$x] == "polka") { echo("match ".$x); break; } } alls well n good till now.. now i've got the index value(2 in this case) of the element which needs to be deleted.. but what should be done now?? is there any function which'll let me delete a particular element in an array? Is there any other way to go around this?
Deleting Contents In File With PHP
Hi, I need to get to a specific part of the file and delete a line so i can overwrite it with a new value. Example ... $Money = array( 0 => 10000, 1 => 932394, 2 => 3254#<Money> ); I need to change first choice "0 => 10000" and replace it with "0 => 7500" so it seems like they spent 2500 moneys I dunno if its possible but if it is please help, and thanks in advance FYI, the file is called testfile.inc and i dunno what that .inc means :P I just got it from a script i downloaded Further more, i want to do this change/replace through a form or a click using PHP.
Deleting Uploaded File
I am using a from in which users enter data as well as upload a file. I also give them an opportunity to delete their entry. Currently I am deleting the entry from the database.
|