Search found 17 matches

by CONFUSIONUK
Sun May 30, 2010 2:10 pm
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Re: Dynamic PHP, MySQL paging

:D that works nicely BUT :lol: where it includes say "?p=home&id=1" it comes up with "Warning: include(1.php) [function.include]: failed to open stream:" but thats because there is no such file i know that, how can i get it to read that post row in the table instead of a file...
by CONFUSIONUK
Sun May 30, 2010 1:09 pm
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Re: Dynamic PHP, MySQL paging

Cheers for looking into this you are a legend!

The row that has the contents of the post is just called 'content' if you needed to know, this seems to be the only bit that has ever puzzled me and is about time I knew how to :lol:
by CONFUSIONUK
Sun May 30, 2010 12:01 pm
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Re: Dynamic PHP, MySQL paging

That sounds exactly like what I need would you be able to point me to a tut or a few lines to get me started :roll:

This is the code and source that is working so far, just the "?p=home&id=1" bit to do
Image
by CONFUSIONUK
Sun May 30, 2010 11:20 am
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Re: Dynamic PHP, MySQL paging

I'm really bad at asking questions and being clear sorry, I know how to select and echo tables from the database but like when you see the post i want it to have "read more" at the end of the post when it has been shortend and then clicking the link go to the full post ie "?p=animals&...
by CONFUSIONUK
Sun May 30, 2010 10:35 am
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Re: Dynamic PHP, MySQL paging

hmmm, I forgot to post the script I am using already <?php $sExpressie = "(http:|ftp:|shttp:|www.|.php|.pl|.cgi|.asp|index.php)"; if(isset($_GET['p'])){ if(preg_match($sExpressie,$_GET['p'])){ header('Location: ?p=error'); }else{ if(file_exists($_GET['p'].'.php')){ include $_GET['p'].'.php...
by CONFUSIONUK
Sun May 30, 2010 8:43 am
Forum: PHP - Code
Topic: Dynamic PHP, MySQL paging
Replies: 12
Views: 1788

Dynamic PHP, MySQL paging

Have had a long browse through the net for this but whatever I type I always get the wrong tutorials. Basically I am looking for a half decent tutorial that show me the rough outlines in which I would need to have dynamic pages ie"index.php?page=animals" and that page pull information from...
by CONFUSIONUK
Mon Sep 28, 2009 11:37 am
Forum: Miscellaneous
Topic: Cron Job Every 15 minutes
Replies: 1
Views: 2250

Cron Job Every 15 minutes

Right i have had a google about and i have found stuff but it seems to be for people that already know what there doing! would some one be able to give me a script for a cron job that will trigger vip/twittercast/twittercast.php on my server every 15 minutes. its just a simple update script that wri...
by CONFUSIONUK
Fri Sep 25, 2009 10:06 am
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

<?php $date = date('l');   //Let's concatenating the day of the week and '.html' into one variable for ease of use $page = 'schedule/'.strtolower(date('l')).'.html';     //This checks to see if the filename exists in the current directory.   //If it does, it pulls the page up.  If not, it pulls up ...
by CONFUSIONUK
Fri Sep 25, 2009 9:54 am
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

Will try this and get back to you asap :wink:
by CONFUSIONUK
Fri Sep 25, 2009 8:44 am
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

Right the script does work fine now
BUT
how can i change the $page variable so i can use files in a sub directory of the original
by CONFUSIONUK
Thu Sep 24, 2009 10:17 pm
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

The "Default" you are seeing is coming from within the default.html file
by CONFUSIONUK
Thu Sep 24, 2009 10:09 pm
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

I was thinking maybe because it being included on the index.php which is a directory behind but then the default.html file is still displaying so im completely clueless :S
by CONFUSIONUK
Thu Sep 24, 2009 9:49 pm
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

It is live yes image below is it being displayed on the site! http://www.shedbass.net/confusion/schedulelive.jpg   <div class="homeTop"><strong>CHECK OUT TODAYS LIVE SHOWS BELOW<br />   <span class="smallPrint">a glimpse at our day line up</span></strong></div> <div class="h...
by CONFUSIONUK
Thu Sep 24, 2009 9:32 pm
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

Image


There you go make life easier if you can just see what i done so far :P

Ohhh and the filenames do have capitals i just forgot to refresh the browser on dreamweaver
by CONFUSIONUK
Thu Sep 24, 2009 9:27 pm
Forum: PHP - Code
Topic: PHP Daily Schedule Rotation
Replies: 20
Views: 626

Re: PHP Daily Schedule Rotation

Ahhh no i got it sorry about that lol, had the filenames still with lowercase just one problem its loading the default and not the friday.html file?