Jump to content

chasethemetal

Members
  • Content Count

    169
  • Joined

  • Last visited

Everything posted by chasethemetal

  1. Thanks ShadowMage. The scientist, I was never knocking on manuels. I was just illustrating how I personally learn from example rather than from scratch.Well this one Is closed. Got it working. And have manipulated it to work for month and year under the same principal. Thanks everyone for your help.
  2. Thanks Ingolme but unfortunately that doesn't seem to work.And justsomeguy. I understand how every line of code works. Except the ability to define the range, and then the method of counting all fields in that range.Going through manuels never really illustrates how to use the functions unless you have some fundamental schooling background in php. which i dont. I'm an amateur seeking advice through working examples so I can get up on my feet in PHP to one day be able to help individuals like myself. But however thanks for pointing out those references.To the world of w3schools. I am still stum
  3. date = MM/DD/YYYY in that format. Every time someone visits my site, their IP is logged and a date is attached in that format.When I echoed weekStart and weekEnd I got strange 4 # length numbers like 7564.I know I'm missing something big. And I just can't seem to find a solution on the web.
  4. I'm blowing it.I'm sure this code is wrong because it's rendering me a "0"I am trying to count all fields that the dates fall in-between the week. So I don't want to count the weeks. More so count all the fields in that week.Aka I've had this many visits this week echo "that count number"heres my n00b code.<?php$data = mysql_query("SELECT * FROM location ORDER BY id DESC") or die(mysql_error());$count = 0;while($info = mysql_fetch_array( $data )) { $date = $info['date']; $currDay = date('w'); $weekStart = strtotime('-2',$currDay);$weekEnd = strtotime('+4',$currDay); if (($date >
  5. There is one last thing I can't figure out... Is there a simple way to manipulate the above solution for getting a count of fields by day, and change it so that you can get a count of fields by week?For everyone's info I am just creating a little stat thing for my site. Basically so I can see a count of visit's by day, by week, by month and so forth. I know freebee stat counters exist and are great like Google Analytics, but something feels better about having my own little half arse version running too.
  6. ShadowMage you are a true mage. Thank you again. hi Five.
  7. This is great. We are getting close. This counts everything so I end up getting a list with 1, 2, 3 ect... How do I get it to echo just the last number and thats it.
  8. Well that would work if I wanted to count allll of the rows. But the idea is to just count the number of rows that have a date that matches "todays" date.
  9. chasethemetal

    Simple Count

    My code as below will echo all the entries from the current day. Now instead of echoing a list of dates, I need to echo a number that counts these results. Any help again would be appreciated I am slowly become not a n00b.<?php $data = mysql_query("SELECT * FROM dates ORDER BY id DESC") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { $date = $info['date']; $today = date('m/d/y'); if ($date == $today) echo ''.$date.'<br />'; else echo''; } ?>
  10. Thanks so much ShadowMage I knew it was something simple! Works perfectly.I was having a classic late night brain ###### and just couldn't think it through.Thanks again.
  11. Hey all!So I need to kill the last comma in this simple loop.It looks like: LatLng(40.713, -73.946), LatLng(40.713, -73.946), but needs to looks likeLatLng(40.713, -73.946), LatLng(40.713, -73.946)The comma is outside the variable $location which might make this more difficult. My code breaks if that last comma is inputed. I am inputing values inside of a javascript function.<?php $data = mysql_query("SELECT * FROM location ORDER BY id ASC LIMIT 2") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { $latitude = $info['latitude']; $longitude = $info['longitude'];
  12. Ok thanks.On a good note. PROBLEM SOLVED. I forgot to put this in my .htaccess filesuPHP_ConfigPath /home/usr/public_html/So my php.ini file wasnt being used throughout my folder structure. But now it is. Problem solved.
  13. Again... I can't seem to get this script to upload anything bigger than 200K.I have in my php.ini filepost_max_size = 20Mupload_max_filesize = 20Mand in my .htacces file I have putLimitRequestBody 2147483647which is the max it can go...yet still I can not upload anything bigger than 200K. Whats the deal? Any suggestions?
  14. So I've been using this script and it has been working. The only problem I've noticed is that it tends to stall out and fail to upload a file thats bigger than say 200KB.Does anyone see an issue with my code that would be causing this?
  15. I am aware of MAMP and the such. But for what I was trying to do I realized the solution that doesn't involve a testing web server on my local machine. Here is a simple upload script I got working for everyone. The only issue I found is that the permissions on the destination folder you create may need to be modified for this to work correctly.---------<?if(!isset($_POST["submit"])){?><!-- THE FORM ACTION IS ONTO ITSELF --><form action="index.php" method="POST" enctype="multipart/form-data"><input name="userfile" type="file" size="40"><input type="submit" name="submi
  16. Thanks!As a am somewhat of a beginner could you clear up what a web server is or illustrate how this process works in more detail?My basic setup right now, is my computer where the site sit's locally, then through an FTP program I upload it to my Lunar Pages server.I assume the web server aspect I would have to virtually create on my machine??? Any links or advice on how to set that up would be awesome!Thanks again.
  17. Hey all!I've been able to find working examples of how to upload files via a browse your hard drive button then when click upload and it will place the file "LOCALLY" on my machine fine.But I've yet to find anythinggg on how to make a script that connects to my FTP server and then uploads the files there.Any guidance on how to connect to a remote server, and upload via a form button would be MUCH appreciated.Thank you.
  18. Hey all!So here is my issue:I have two columns that have a CSS drawn background and border.Column 1: I need one table to always be aligned to the TOP and one table always to be aligned to the BOTTOM.Column 2: Information in this column changes and forces a gap between info 1 and 2 in first column.BUT each Column has to have 1 encapsulating background styleThis isnt my exact code, but this models how I have it structured and would like to know how I could make this work. Thanks so much.<style type="text/css">#background { background:#f8f8f9; border:1px solid #5b7390; border-radius:7px; -
×
×
  • Create New...