Jump to content

mahenda

Members
  • Content Count

    87
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mahenda

  • Rank
    Regular Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. How can I instruct user with normal php, Since normal php depend on form submission while the plugin help and instruct user to fill correct data
  2. How can I add parsley attributes /rules in custom.js file instead of adding them in form field I have <form id="register"> <input type="email" name="email" id="email"> </form> //Js $("#register"). parsley ( //How to write all validation here not inside the input element. );
  3. I'm facing trouble on check box when register form is submitted without check the check button, but when the button is checked the error disappear . can you give me idea why and how to solve this issue. I saw many sites with such kind of button on registration form please any one who can solve this.
  4. Check here If(empty($username){ echo ' user name is required'; } At the same time We have written a jQuery that prompt the message 'user name is required' if he/she submit an empty value. Here all warning message will be printed at the same time, and it is going to be a bad idea since we have two messages at the same time. So how to handle this?!
  5. Is jquery/Ajax better than real/raw PHP for form validation ?! What if JavaScript is turned off on the browser?! why after someone refreshing a page on the browser, the variables used to echo error after invalid data is being submitted will return the undefined variables error?! And how to handle form validation including an empty form field, maximum amount of value entered and so on
  6. Thanks you guys I solved the problem. It was the view part not a PHP code
  7. Here the data is sent in a database but the echo '<span>Hi '.$name.'</b>,subscription is now active.</span>'; doesn't work. In else statement
  8. All queries are inserted successfully but why this statement is not showing on page to tell user about subscription is sent successfully This one echo '<span>Hi '.$name.'</b>,subscription is now active.</span>';
  9. The first echo after The echo after the above code is show and it is okey but the problem is there on the echo after insertion of data the echo doesn't show the given success message on the page
  10. <?php global $con; $name = $_GET['name']; $email = $_GET['email']; if((!empty($name)) && (!empty($email))){ $check = $con->prepare('SELECT email FROM subs WHERE email = ?'); $check->execute([$email]); $row = $check->fetch(); if($email == $row['email']){ echo '<span>'.$email.' already in database, try another email!.</span>'; }else{ $subscribe = $con->prepare('INSERT INTO subs (name, email) VALUES (?, ?)'); $subscribe->execute([$name, $email]); if($subscribe){ echo '<span>Hi '.$name.'</b>,subscription is now active.</span>'; }else{ echo '<span>Try again</span>'; } } }else{ echo '<span>please enter something</span>'; } ?> the problem found at if($subscribe){ //the echo not showing the span element when data is inserted } any help please?
  11. no i dont want this /article/this-is-new-product to /article?title=this-is-new-product i want this /article?title=this%20is%20new%20product to be /article/this-is-new-product check here RewriteRule ^([a-zA-Z0-9]+)$ article.php?title=$1 RewriteRule ^([a-zA-Z0-9]+)/$ article.php?title=$1
  12. i dont have that, but i have the link like below if you have an example of an .htaccess to make a clean url please help me. //the title <div class="title"> <a href="<?php echo 'article? title='.$title['title'];?>" ><?php echo $title['title'];?></a> </div> which produce this after being clicked http://localhost/mysite/article?title=this is new%20product but i want to get this http://localhost/mysite/article/this-is-new-product if i try to use str_replace then there is no result shown after clicking the link
  13. One sure-fire way to get people to not help you is to tag them and plead for their help. What RewriteRule have you tried to do this? "Can't" do that with just mod_rewrite. The problem is that you want to replace spaces with hyphens. What you can do is rewrite /article/this-is-new-product to /article?title=this-is-new-product. So first make your article.php support that. When that's ready, What RewriteRule have you tried to do this? check on the htacess above
×
×
  • 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.