Jump to content

MarkT

Members
  • Posts

    168
  • Joined

  • Last visited

Everything posted by MarkT

  1. I'll fix those after, but what I'm focusing on is the problem in the original question. Any ideas how to fix it?
  2. Other match reports there, when I corrected them and put ', instead of the ' it works. Should I be looking at the input page?
  3. $correct1 = str_replace("'", "'", $request2['content']); Still not working mate. Here's whats wrong; http://dittonminorsfc.co.uk/matchreports.php?id=6 It shows up with ?, it shows the ' when you use ' but it doesn't like ' straight into text. Any ideas?
  4. I've just tried; $request = mysqli_query($con,"SELECT * from match_reports WHERE id='{$_GET['id']}'");$request2 = mysqli_fetch_array($request);$correct2 = str_replace("'", "'",$request2['content']); But it's not replacing it?
  5. I've tried the javascript, but didn't really get what I should do with it. Can you explain it in lame terms please.
  6. MarkT

    PHP Sessions & $_GET

    Tbh, I'm not sure. Basically the session variable isn't used in the code, but for some reason, it overwrites $_SESSION['team'] with whats in the $_GET
  7. Hello, I have a PHP echo from my db, $request2['content'], which I want to replace any ' characters with this; ' Can anyone provide me the code please to add to the page.
  8. MarkT

    PHP Sessions & $_GET

    <?PHP session_start();?><!DOCTYPE html><?PHP require "./system/connect.php" ?><head><title>Ditton Minors Football Club :: The Future's Bright - The Future's Red & Black</title><?PHP include "./includes/css.html" ?> <?PHP$team = $_GET['team'];$select = mysqli_query($con,"SELECT * FROM teams WHERE team = '{$team}'");$select2 = mysqli_fetch_array($select);?><?PHP include "./includes/meta.html" ?></head><body><div id="alert"><marquee onmouseover="this.stop()" onmouseout="this.start()"><?PHPecho "{$select2['alert']}";?></marquee></div><?PHP include "./includes/membernavi.html" ?><?PHP include "./includes/banner.html" ?><div id="textbox"><?PHP include "./includes/navi.html" ?><br /><h1>Ditton Minors - <?PHP if($_GET['team'] == "MINI") { echo "Mini Minors"; } else {echo $_GET['team'];} ?> Team</h1><p><center><img src="./images/teams/<?PHP echo $_GET['team']; ?>.jpg" oncontextmenu="return false;" alt="Ditton Minors <?PHP if($_GET['team'] == "MINI") { echo "Mini Minors"; } else {echo $_GET['team'];} ?> Squad" title="Ditton Minors <?PHP if($_GET['team'] == "MINI") { echo "Mini Minors"; } else {echo $_GET['team'];} ?> Squad" width="800" height="500" style="border: 5px inset #FF0000;"></center><center><table><tr> <td> <h2>Contact Details</h2> <p style="font-size: 16pt;"><strong>Manager:</strong> <?PHP echo $select2['manager_name']; ?><br> <strong>Email:</strong> <a href="mailto:<?PHP echo $select2['manager_email']; ?>"><?PHP echo $select2['manager_email']; ?></a><br> <strong>Mobile:</strong> <?PHP echo $select2['manager_phone']; ?><br> </td> <td> <h2>Training Details</h2> <p style="font-size: 16pt;"><strong>Location:</strong> <?PHP echo $select2['training_location']; ?><br> <strong>Day:</strong> <?PHP echo $select2['training_day']; ?><br> <strong>Time:</strong> <?PHP echo $select2['training_time']; ?><br> </td><?PHP if($_GET['team'] !== "MINI") { echo ' <td> <h2>Match Details</h2> <p style="font-size: 16pt;"><strong>Home Ground:</strong> '; echo $select2['home_ground']; echo '<br> <strong>Days:</strong> '; echo $select2['match_day']; echo '<br> <strong>Kick-Off:</strong> '; echo $select2['match_ko']; echo '<br> </td></tr></table></center>'; } ?><center><table><tr> <td> <h2>Sponsors</h2> <p style="font-size: 16pt;"><strong>Company:</strong> <?PHP echo $select2['sponsor_name']; ?><br> <center> <a href="<?PHP echo $select2['sponsor_url']; ?>" alt="<?PHP echo $select2['sponsor_name']; ?> Sponsor Ditton Minors FC <?PHP echo $_GET['team']; ?>" title="<?PHP echo $select2['sponsor_name']; ?> Sponsor Ditton Minors FC <?PHP echo $_GET['team']; ?>"> <img src="./images/logos/<?PHP echo $select2['sponsor_image_name']; ?>" alt="<?PHP echo $select2['sponsor_name']; ?> Sponsor Ditton Minors FC <?PHP echo $_GET['team']; ?>" title="<?PHP echo $select2['sponsor_name']; ?> Sponsor Ditton Minors FC <?PHP echo $_GET['team']; ?>" width="300" height="150" style="border: 5px inset #FF0000;"></center> </a> </td></tr></table></center></p></p></div><div id="footer"><?PHP include "./includes/footer.html" ?></div></body>
  9. If not, you can use the following code; <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> <source src="movie.webm" type="video/webm"> <object data="movie.mp4" width="320" height="240"> <embed src="movie.swf" width="320" height="240"> </object> </video> The <source> tags are all the different sources you wish to be available. You can use only one of these if you wish. The width and height are obvious, they're the size of the video player you wish the video to be shown in. Hope this helps! Source; http://www.w3schools.com/html/html_videos.asp
  10. It's a bit dull tbh. I think if you added some more colour, you'd keep your audience looking at the site for a lot longer.
  11. Everything's working fine for me in Chrome, and also firefox. Look; GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGLE Ok Button works fine for me.
  12. MarkT

    PHP Sessions & $_GET

    Hello, I have a website, www.dittonminorsfc.co.uk, and on the team page, www.dittonminorsfc.co.uk/team.php?team=U7 it overwrites the session variable with what is in the $_GET at the top of the URL. Any ideas? Cheers p.s. the session variable isn't even called in the code, the only thing related to sessions is the <?PHP session_start(); ?> at the top of the page.
  13. I recommend using PHP & Sessions. <form method="post" action="?action=submit"> <input type"text" name="fname"> <input type="submit" value="submit"> </form> <?PHP if($_GET['action'] == "submit") { $_SESSION['fname'] = $_POST['fname']; } ?> put <?PHP session_start(); ?> before <html> Where you want name put: <?PHP echo $_SESSION['fname']; ?>
  14. MarkT

    PHP for Mail

    Hello, I'm trying to fetch email addresses from a database, which I'm using a MYSQLI Select for. I want to select email addresses based from a form, and then send an email to those addresses, can anyone provide code? How to echo those addresses in the 'to' part of PHP Mail.
  15. MarkT

    BCC in PHP Mail

    Hello,I'm looking for someone to supply me with the code to BCC in PHP Mail.I need the following SQL results,mysqli_query($con,"SELECT email_address FROM parents WHERE team = "{$_GET['team']}")Then BCC all of those results, in a PHP mail, which will be written on the website and sent via post.Thanks in advance.Ps. Is it me or is the forum broken?
  16. Sorry, I don't get it, please can you show me by editing my code?
  17. MarkT

    Help with code

    I recommend using your database, so when someone signs in, set active to 1, then use a simple IF statement and list their names. Does this make sense?
  18. Hello, I have the following code: Checklicense.php (Remote Server): <?PHP$con = mysqli_connect("*******");$domain = $_SERVER['HTTP_HOST'];$query = mysqli_query($con,"SELECT status FROM licenses WHERE domain = '{$domain}'");$query2 = mysqli_fetch_array($query); if($query2 == "Expired") { echo "<div id='warning'>THIS SOFTWARE IS NULLED <br> PLEASE BUY A LICENSE HERE</div>";} else {} ?> Index.html: <?PHPecho file_get_contents("./licensing/checklicense.php"); ?> However when it's all in the same file it works, basically my aim is to achieve a licensing system where the script contacts the remote server, which then checks the licenses table to see whether the status is active or expired. If it's expired it shows the warning, if not it allows the script to appear normally. My licenses table has a domain column, which I want the query to check for in the database and then return Active or Expired, for the index page to show the warning dialog of it being nulled. My code will be encrypted. I would be grateful if anyone can help me achieve my aims. Also, Happy new year everyone.
  19. have a drop down, and then an if statement, if($_POST['operation'] == "multiply") { }
  20. It Works, Thanks!
  21. Hello, I have the following code in a file called upload_file.php: <?php if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>"; $filename = $_FILES["file"]["name"]; $filetype = $_FILES["file"]["type"]; $title = $_POST['title']; $content = $_POST['content']; $image_pos = $_POST['image_pos']; $publisher = $_POST['publisher']; mysqli_query($con,"INSERT INTO news (title,content,image,image_pos,publisher) VALUES ('{$title}','{$content}','{$filename}','{$image_pos}','{$publisher}')"); if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } }?> and I get the following error: Can someone please help me, my file permissions in the upload folder are 777 and the directory exists. Can you please help with the SQL problem and the File upload? Thanks in advance!
  22. Personally, It looks too much like a template that you've edited, maybe if you have less generic features and more abnormal features, it will increase revenue and show possible features that are exclusive to you, it's only my opinion.
  23. Yeh, Just never File Upload....
  24. MarkT

    HTML Button

    Instead of using JS, I prefer to use PHP If statements, I find it more effective and more functionality. Personally this is my opinion. But I recommend trying it as you can use them for most things.
  25. You can. in the <img> tag add <img oncontextmenu="return false;"> Will stop right clicking on an image.
×
×
  • Create New...