Jump to content

MarkT

Members
  • Posts

    168
  • Joined

  • Last visited

Posts posted by MarkT

  1. $request1 = "It jess ain't my copyright problem.";$len1 = strlen($request1);$correct1 = str_replace("'", "©", $request1);$len2 = strlen($correct1);echo "{$request1} {$len1} <br/>{$correct1} {$len2}";

    $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?

  2. 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?

  3. <?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>
  4. 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

  5. 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.

  6. 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']; ?>

  7. 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.

  8. 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?

  9. Hi,

    in your code thereis an issue

     

    when you fetch the result $query2 = mysqli_fetch_array($query,MYSQLI_ASSOC); note the second arg MYSQLI_ASSOC the next step is to get the status field from the result like that $result = $query2['status'];

     

    then test it if($result == "Expired"); and here is a link explain it http://uk3.php.net/mysqli_fetch_array

     

    Sorry, I don't get it, please can you show me by editing my code?

  10. 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?

  11. 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.

     

  12. 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:

     

     

    Upload: Type: Size: 0 kBTemp file: PHP Error Message Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/a7017672/public_html/upload_file.php on line 18 already exists.

     

    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!

  13.  

    I've been in the business for close to 10 years and re-designed the site a few times. I'd like to know as a perspective client what do you think of my site? (where/how things are places, pages, text)

    http://vchrisstudio.com/

    Thanks

     

    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.

  14. 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.

×
×
  • Create New...