Jump to content

SaCH

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

About SaCH

  • Birthday 06/08/1995

Contact Methods

  • Website URL
    http://www.google.com

Profile Information

  • Gender
    Male
  • Location
    Kerala , India

SaCH's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks Agian.... I hope someone's new replies against this.
  2. Thanks for your knowledge. that means the working condition of it without bracket and with the bracket is same.
  3. Dear friends, I have a class to validate a form. This is not my own class & i got it from some where. This is my class <?php class validation { function email_validation($email, $email_label) { //E-mail validation: We use regexp to validate email. $email = trim($email); if (strlen($email) >= 1 ) { if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $email) === 0) $error = 'You have to enter a valid '.$email_label; else $error = null; }else $error = 'You have to enter your '.$email_label; return $error; } } ?> My question is in this function consider this line of code if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $email) === 0) $error = 'You have to enter a valid '.$email_label; else $error = null; here we do not using this "{" and "}" inside the if statement but is working without it. Iam confused about it and anyone can clear it out ?? Why we do not using that on the function & why did it does not producing the error ?? Thanks In Advance!!
  4. I think it will not solve the issue.Check out http://proxy4free.com it provides list of proxy sites based on different countries. Then how can we trace the area ? But I think this answers your own question. It is difficult to ban someone because there is no way to uniquely identify them on the web all the time. So this means that banned users should have as many loops to jump through. Ban their IP, ban their email, validate a phone (if possible, text is easiest), make the registration process as long as possible, log IPs in a certain region if it contains a user banned in the past week. You want to keep banned users away, and honestly it's a gimmick. How badly do you want the banned user to be kept off? The more you try to do to keep the banned process automated, the higher amounts of hoops everyone has to jump through. I worked customer support for eBay for a couple years until just last month. A banned user could usually get back onto the site with little work. EBay would flag the account and someone would usually take a look at it. Truth is bans require a staff or a person (depending on the scale of operation) to enforce. At least in my eyes. Very sad to hear the sound. I think the verification process (Require the Voter ID Proof / Passport copy) will be safe but its too complicated & our system must be secure to deal with these features. Anyway thank you for sharing your experiences.
  5. I think it will not solve the issue.Check out http://proxy4free.com it provides list of proxy sites based on different countries. Then how can we trace the area ?
  6. Hello Friends, Iam in a little bit confused matter. Iam developing a website & it requires a user's banning system too so my question begin here that if i use user's IP to ban but they can easy access the website by using different proxy sites & almost ip address are dynamic not static. Banning their email is waste thing because they can create a new email within 1min. Anyone have experiences in these things ? How we can ban a user permanently from accessing the website ?
  7. Actually where is the problem ? In your test.php or post.php & what is the response you are getting ?
  8. That means we should use the function unset() to clear the session data. Else if we simply set it like this $_SESSION['value'] = ''; rather than using unset() function it will consider there is a session value existing. We can understand this thing from "scootstah" post.
  9. Try something like this <?php //this is the email id which you pull form your database. $to = $slide[email]; //this is the another email that you want to send the email. $another = "example@example.com"; //sending the email with php mail() function //1st sending the mail to the email id which you pull from database. if(mail($to,$subject,$message,$headers)) { //2nd sending the mail to the email id which you given as $another variable if the 1st mail is success. mail($another,$subject,$message,$headers); } else { echo 'Email not sent to'; } ?> [/code]
  10. Ok.. can you post your full code here ?
  11. Ok.. then what is the problem with my way ? Is there is any problem if i return the function with completely detached use of of <pre> tag ?
  12. yes you are right because //this variable contains only the directory path which the image file to be stored. So you don't need to put the "/" end of the path. $path = "/pics"; //this variable contains the joining of file name with its directory path to get the real path of the image file. So you don't have to edit this. $mysql_path = $path."/".$filename; //if you echo this line. echo $mysql_path; //the result will be. /pics/somefile.jpg
  13. Yes with your example the output will be similar to the "scootstah" opinion. But with my example its displaying the same output for both function. Why it happen & scootstah opinion is right or anything else ? Just try with this code & see the output. <?php echo "var_dump:<br>"; $name = array('muddy', 'funster', 'frogger', 'packman'); echo '<pre>'; var_dump($name); echo '</pre>'; echo "<br><br><br>print_r:<br>"; $name = array('muddy', 'funster', 'frogger', 'packman'); echo '<pre>'; print_r($name); echo '</pre>'; ?> Confused !!
  14. Its very simple to store the image path into your mysql database. please consider this example. <?php //getting the filename of the image file. $filename = $_FILES["image"]["name"]; //directory name to be stored. $path = "data/mydata"; //uploading the image file with the image file name into the directory. if(move_uploaded_file($_FILES["image"]["tmp_name"],$path."/".$filename) { //if the image is stored success into the directory then we are going to store into database. //the real path with the filename. $mysql_path = $path."/".$filename; //sql query to be executed. $sql = "INSERT INTO `tablename`(`filename`,`path`) VALUES ('$filename','$mysql_path')"; //executing the query. if(mysql_query($sql)) { echo 'path inserted into database'; } else { echo 'path not inserted into database'; } } else { echo 'file not uploaded'; } ?>
  15. @scootstah Sir, Consider the above code & its output. <?php $arr = array(range(0,5)); echo '<pre>'; var_dump($arr); echo '</pre>'; ?> Output : array(1) { [0]=> array(6) { [0]=> int(0) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(4) [5]=> int(5) } } Then what is the difference between var_dump() and print_r() using with the <pre> tag ? I tried the <pre> tag with both function var_dump() and print_r() and i got the same output.
×
×
  • 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.