Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="font3">Add</div>
- You can add a casino here:
- <form method="post">
- <p>Your name:</p>
- <input name="name" type="text" size="25" required />
- <p>Your email address:</p>
- <input name="email" type="email" size="25" required />
- <p>Name of the casino:</p>
- <input name="casino" type="text" size="25" required />
- <p>URL of the casino:</p>
- <input name="url" type="url" size="25" required />
- <p>Logo of casino:<sup>Image must be on your own host</sup></p>
- <input name="image" type="text" size="25" />
- <p>Description of the casino:</p>
- <textarea name="description" cols="50" rows="5" wrap="virtual" maxlength="1000"></textarea>
- <input type="submit" value="Send" />
- </form>
- <?php
- if($_SERVER['REQUEST_METHOD'] == 'POST'){
- $name = $_POST['name'];
- $username = $_SESSION['user_name'];
- $email = $_POST['email'];
- $casino = $_POST['casino'];
- $url = $_POST['url'];
- $image = $_POST['image'];
- $description = $_POST['description'];
- $code = rand(1000000000, 9999999999);
- if(preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url) OR preg_match("/^[A-Za-z0-9_- ]+$/", $name) OR preg_match("/^[A-Za-z0-9_- ]+$/", $casino) OR preg_match("/^[A-Za-z0-9_- ]+$/", $image) OR preg_match("/^[A-Za-z0-9_- ]+$/", $description)){
- echo"Success!";
- }
- else{
- echo'No success!';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment