Jump to content

jesushax

Members
  • Posts

    498
  • Joined

  • Last visited

    Never

Everything posted by jesushax

  1. hi all, i was wondering how id go about stopping a user typing in a direct path to download a file, i want it so they have to be logged in then click the link from a logged in page only then will it download anyone help me out? Cheers
  2. yeah i forgot to mention id need to reset the value after the problem has been rectified can anyone sample me some code that will create a textfile or whatever file and put a 1 in it? then ill either figure out a code to update it to a 0 or ill change the result back to 0 then i caould run an if statement to check for a 1 if results is a 1 email me Thanks also would this file need chmod permissons? and would giving this file permissons, leave a security vunreability?
  3. hi all, im tryign to create error notification if my mysql database goes down i have an errorpage set up to email me if the mysql goes down but i only want to be emailed once not everytime someone vists the site and gets redirected to the error page so someone goes to mysite.com mysql is down so goes to mysite.com/errorpage.php?mysql now i want to run a function that emails me and i only want to be emailed once, anyone know how i could achieve this? Thanks
  4. awww bloody hell im such an idiot lol it was working just my code for my form field... i had it like <input name="Sect1_5" type="text" size="15" value="<?php if($action == "edit") { echo $row["Sect1_5"]; } else { echo NoSpaces($post["Sect1_5"]); } ?> " /> leaving spaces after the value has been posted, god dammit lol sorry for wasting your time :| sowiiiiiii! THanks
  5. i tried that, it didnt get rid of any of them :| also that would remove space if a user has put space between a word which we need to keep
  6. well heres the code that make this happen form data goes to register.php register.php $_SESSION["PostData"] = $_POST; so i can recall the form data if the users gets redirected becuase of an errror, eg. they havent put in a required field so when the user is redirected back to regform regform.php $post = $_SESSION["PostData"]; <input name="Sect1_6" type="text"size="30" value="<?php echo NoSpaces($post["Sect1_6"]); ?> " <?php if($error == "email") { echo 'style="border:1px solid #FF0000;"'; } ?> /> no spaces function function NoSpaces($text) { $text = str_replace("\t","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); return $text; } and in that field i have the value 12345687 which has those wierd spaces trailing it, we got rid of the tab not theres these smaller spaces that look just like spaces but there not?
  7. it gave back this Position 0:49 Position 1:50 Position 2:51 Position 3:52 Position 4:53 Position 5:54 Position 6:56 Position 7:55 what does this mean?
  8. hmm well the text seems to still have some sort of spacing character in there <?php $text = "12345687 "; $text = str_replace("\t","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); $text = str_replace(" ","",$text); echo $data; ?> gives me the below the tabs gone but theres still spacing if you highlight it, what can this spacing be? 12345687
  9. what is a space in the same format as the /t for tab
  10. ah yes, whoops my bad i knew that the /t worked seems it was a tab after all
  11. ok for arguments sake just try changing the following <?php if(session_is_registered(usName)) { //change to if(!empty($_SESSION("usName"))) { if($count==1){ session_register(usName); //change to if($count==1){ $_SESSION["usName"] = $usName; ?>
  12. right ive just copied that dodgy text into a page now and im trying everything to get rid of it i even copied and pasted the whole gap into the str_replace and that didnt work :| <?php $data = "12345687 "; str_replace(" ","",$data); echo $data; ?>
  13. i thinks its becuase you have html before the header, you cant write html to the page then redirect this shoudl work <?php $insert = $_POST['insert']; if ($insert !=""){ //database stuff here //redirect after update so i can insert another reciept cost header("Location: index.php"); }else{ echo ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Insert Receipt</title> </head> <body>'; echo "You havent inserted a value"; echo ' </body> </html>'; } ?>
  14. ok next echo the result for $count your session relies on $count being 1 so lets see if its not 1
  15. yeah i did, but trim only removes 1 trailing and leading space doesnt it that example text has 4 spaves and some wierd tab:| i tried both no luck $text = trim($text); $text = str_replace("\t","",$text);
  16. no still didnt work, could it be something else not a tab?
  17. have you tried echoing usName before you create the session $usName = $row['login_username']; echo $usName; see if that returns a result
  18. hi all the below is copied from my source 12345687 if you copy it then start deleteing after 4 deletes it jumps like a tab space, but i tired a str_replace to remove the tab spacing didnt work function NoSpaces($text) { $text = str_replace(" ","",$text); return $text; }
  19. it would be with using javscript, and naming the window this will work here http://www.dynamicdrive.com/dynamicindex8/autocenter.htm jsut change the sizes etc so suit
  20. hi all, could any one tell me how to do the above example " testing " would become "testing" thanks
  21. just tried this works a treat regsiter.php $_SESSION["PostData"] = $_POST; regform.php $posts = $_SESSION["PostData"]; echo $posts["Sect1_6"];
  22. hmm the hidden fields thing i couldnt use because using a header(location:..) code after html causes problems, has done for me in the past anyway could i not put all the form data into one session then use an array on the regform to split the session data? just how would i do it?
  23. try using css to style it <body style="background:#01245C;">
  24. hi all what i want to do is for for errors my form goes to register.php and then if a field isnt filled in the page gets redirected back to regform.php but the information the user already inputted is lost so what i want to do is gather the post data in a session then if where redirected call the session and repopulate the form with the data the user just inputted anyone know how i can do this, would it be using arrays? thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.