Jump to content

isedeasy

Members
  • Posts

    257
  • Joined

  • Last visited

Everything posted by isedeasy

  1. Ummm OK? You really think I would post links to malicious/NSFW sites? I have 250 0dd posts and been a members here for years. The only reason I have posted tinyurl links is because I don't want this thread to show up if a search is done for my domain. Thanks for taking the time to read my thread. Regards edit - I forgot to mention in my first post that the site is HTML5 and I have not got round to IE support.
  2. Hi I have been coding a new web app and would like it bug tested. The website is:- http://tinyurl.com/d7q2hlo Here is confirmation that I own the site:- http://tinyurl.com/caddg2c I have created a login for phpfreaks:- username: phpfreaks password: phpfreaks Please let me know if (when) you find any bugs or if you have any improvements you think I should make. All the text on the site is a first draft, so don't bother checking for grammar/spelling mistakes as it will all be changed Regards
  3. What if it's not today's date I want to add a month to?
  4. I am trying to add 1 month to a certain date from a database, I have searched for a solution and found the following :- <?php $todayDate = date("Y-m-d"); $dateOneMonthAdded = strtotime(date("Y-m-d", strtotime($todayDate)) . "+1 month"); echo date('Y-m-d', $dateOneMonthAdded); ?> This seems like a lot of code to add 1 month to a date? The format I store the date as is:- 2012-05-24 I need to turn this date into:- 2012-06-24 Do I have to keep converting the date like above or is there a way of doing it with less code?
  5. Thank you sir, that is exactly what I was looking for!
  6. I want to have urls that look like the following:- url - www.domain.com/login/ file - /sections/login.php url - www.domain.com/contact/ file - /sections/contact.php my index file just looks for the page name in the query string and includes the appropriate file. I have the following rule that sort of works but I need something that wont lose the rest of the query string. RewriteRule ^([a-zA-Z\_]+)[/]*$ index.php?pl=$1 I need it so that www.domain.com/home/?foo=bar will send my index.php the following vars $_GET['pl']; $_GET['foo']; foo could be anything and the amount of variables that can be passed back needs to be unlimited. Any help would be much appreciated. Thanks
  7. Wow I feel dumb, never knew MySQL had an IF function Working query below SELECT o.opponent_name, COALESCE(SUM(league_points),0) AS `points`, COALESCE((SUM(league_goals_for)-SUM(league_goals_against)),0) AS `goaldifference`, SUM(IF(l.league_points = 3, 1, 0)) AS `wins`, SUM(IF(l.league_points = 1, 1, 0)) AS `losses`, SUM(IF(l.league_points = 0, 1, 0)) AS `draws`, COUNT(l.league_points) AS `played` FROM league l LEFT JOIN opponents o ON o.opponent_id = l.league_team WHERE l.league_season = {$Config['season']['current']} GROUP BY l.league_team ORDER BY points DESC
  8. Hi I have a table which holds all the results for my football teams league, the structure looks like:- CREATE TABLE `league` ( `league_date` int(11) NOT NULL, `league_comp` int(3) NOT NULL, `league_season` int(2) NOT NULL, `league_team` int(4) NOT NULL, `league_points` int(1) NOT NULL, `league_goals_for` int(2) NOT NULL, `league_goals_against` int(2) NOT NULL, `league_home` int(1) NOT NULL, `league_opponent` int(4) NOT NULL, PRIMARY KEY (`league_season`,`league_team`,`league_home`,`league_opponent`) ) ENGINE=InnoDB the information I need to get is as follows:- team name games played wins losses draws points goal difference (the info with a strike-through is not the issue) my query at the moment looks like this $DB->query("SELECT l.*, o.opponent_name, COALESCE(SUM(league_points),0) AS points, COALESCE((SUM(league_goals_for)-SUM(league_goals_against)),0) AS goaldifference FROM league l LEFT JOIN opponents o ON o.opponent_id = l.league_team WHERE l.league_season = {$Config['season']['current']} GROUP BY l.league_team ORDER BY points DESC"); I am having a problem getting the the amount of games played and the amount of each kind of result. the information is in the table because of the `league_points` column (3=win,1=draw,0=loss). Any help in finishing this query would be great, I know I could add extra columns but there must be a way of doing it with the info in the db. It's probably real simple lol
  9. isedeasy

    Wow

    We have known this for years p.s you posted this in the wrong forum, are you using IE by any chance
  10. Congratulations! That is some achievement right there! Can we see your app that won you the title?
  11. Impressive Your old (current) site has issues with navigation links appearing/disappearing depending on what page you are on. I don't like how there is no boundary between the white wrapper and the predominately white background.
  12. Make sure error reporting is on and use firebug to see what the ajax is returning.
  13. First of all you are posting the data and looking for get data in your php code. Also it looks like you are just passing the php script one string try the following:- $.ajax({ type: "POST", data: { name: name, email: email, subject: subject, textarea: textarea }, url: "./include/process_contact.php", success: function(data){ alert(data); } }); <?php $to = "noskiw@hotmail.co.uk"; // I would do some validating here $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['textarea']; $headers = "From: {$_POST['name']}"; mail($to, $email, $subject, $message, $headers); echo "Email sent"; //or better yet some json including any error/success ?>
  14. When I tried to register I got the following:- Fatal error: Cannot redeclare geoip_load_shared_mem() (previously declared in /home/eonbux00/public_html/mucove.com/assets/includes/geoip.inc:236) in /home/eonbux00/public_html/mucove.com/assets/includes/geoip.inc on line 252 I then closed the tab
  15. I have a class that I created, halfway down my page I call a function from the class which prints some code and also changes a variable inside the class. It's a search class basically it prints out the search results and saves the total amount of results into the variable. I want to display the amount of results above the results like so:- echo $Search->results; $Search->GetResults('foo'); The problem is that $Search->results will be equal to NULL until the variable is updated in the function GetResults. Hope that makes sense, am I going about this wrong?
  16. I am trying to get data out of my database to display in a graph, the problem I have is that if there are no rows on a certain date then that date does not get placed into the array. I am thinking I will need to loop through previous dates and match the 'current working date' to the keys of my array to see the total number of rows my array of data from the database will look like this :- Array ( [2011 April 25th] => 32 [2011 April 26th] => 70 [2011 May 6th] => 86 [2011 May 7th] => 86 [2011 May 8th] => 87 [2011 May 9th] => 86 [2011 May 10th] => 86 [2011 May 11th] => 79 ) notice the gap between april 26th and may 6th, thats because there are 0 rows in the database that fall on these days. Whats the best way to loop through say the past month? Hope this makes sense, if there is a better method I would be glad to hear it.
  17. I would look into using JSON for your ajax requests, I noticed that it does a http request for every post just to update the time.
  18. if ( !isset($_GET['q']) ) { //throw an error message }
  19. That's because you are echoing out php into the jquery .html() method You need to either have the contents for all the posts hidden on the page or use AJAX to pull in the messages when required. untested example $_message_list .= '<dd class="message_content">'.profile_link($row[$key]['m_content']).'</dd>'; <script type="text/javascript"> $j = jQuery.noConflict(); $j(document).ready(function(){ $j('dl.message_row').click(function(){ $j('li.message').html($j(this).siblings('.message_content')); }); }); </script> That each method has its advantages/disadvantages AJAX method + only getting the content you want - every time the user clicks a message to are doing a http request and a database query Hide/Show method + only one database query - you are getting every comment on page load even if the user will not see them Hope this helps
  20. have you tried turning error reporting on and working your way through the errors?
  21. echo $result[0] . ' ' . $result[1]; echo "{$result[0]} {$result[1]}";
  22. I like it, it's very now I love the colour scheme but I have always been a fan of darker sites. The Easter eggs is a nice little feature (love the second one).
  23. Ok thank you. How should I go about keys for this table? CREATE TABLE `comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` int(6) NOT NULL, `item` int(6) NOT NULL, `type` int(1) NOT NULL, PRIMARY KEY (`id`), KEY `user` (`user`), CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`user`) REFERENCES `users` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 Is there away to use a foriegn key for the`item` column as it can be joined with different tables?
×
×
  • 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.