So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempts to copy the users xml file(i stored all users information, in xml files as a backup of my database). They're all located in a folder named "xml", which is located in the root directory of my website, as is 'delete_user.php'. What i want to do is, that the file name is changed when the person's user account is deleted. Here's the code i've tried to do it with, i get an 'invalid directory / file error' when i try to run the script.
Code: <?php $path = "/xml/";
// you cannot see it here, but $login contains a username. (The username is the name of the file)
// eg. an user named "sharal" would have an associated xml file named "sharal.xml"
// this is not exactly what i want it to do, but it simply renames the file with it's original name
// and adds "old" behind it
$file = $login;
$old = "old";
$new_path = $login . $old;
rename($path.$file.".xml", $path.$new_path.".xml"); ?>
Sessions Value Not Saved
Hi,Im making a login form and im using this code:Code: if($login=="true"){$_SESSION['mlvl']=1;if($username=="admin"){$_SESSION['admin']=1;}else{$_SESSION['admin']=0;}}but when the
I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.for ($i=0; $i<10; $i++){........//I would like it to wait 5 seconds here}
disable all input buttons
Hello Friends,suppose i do have a file ( file.php ) has a submit buttonCode: [Select]<input type=submit name=add value=go> is there any way so i can make the button shown but in same
Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to check if a session is currently running of my app, like maybe using a cookie or something?
smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i seem to have hit:There is an application which i am currently coding, which writes everything that
preg_match logical error
Code: <?php$s = file_get_contents("page.html");preg_match('/<div class="brown_box main_ge_page vertically_spaced"><div
if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough to do, but I'm flailing here...I need to have a blurb that checks to see if a cookie of a specific
Help With editting and deleting form
So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this :Code:
Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.How can i get a drop down list to pull these numbers from the table?So if i then added more numbers to the table then
convert pps to wsf with php'how?
hii want to convert with php PowerPoint file to swf file(flash)how please?thank!!!