Jump to content

aliks0905

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aliks0905's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. wow!! thanks a lot! a small trim() function fixed everything!
  2. The results I receive are: The dates for the $date field are correct except for the very last one with no date. Select a date: SELECT * FROM slotinfo WHERE date = '2010-04-02' SELECT * FROM slotinfo WHERE date = ' 2010-04-05' SELECT * FROM slotinfo WHERE date = ' 2010-04-07' SELECT * FROM slotinfo WHERE date = ' 2010-04-09' SELECT * FROM slotinfo WHERE date = ' 2010-04-12' SELECT * FROM slotinfo WHERE date = ' 2010-04-14' SELECT * FROM slotinfo WHERE date = ' 2010-04-16' SELECT * FROM slotinfo WHERE date = ' 2010-04-19' SELECT * FROM slotinfo WHERE date = ' 2010-04-21' SELECT * FROM slotinfo WHERE date = ' 2010-04-23' SELECT * FROM slotinfo WHERE date = ' 2010-04-26' SELECT * FROM slotinfo WHERE date = ' 2010-04-28' SELECT * FROM slotinfo WHERE date = ' 2010-04-30' SELECT * FROM slotinfo WHERE date = ''
  3. I get the dates to come out just fine. The problem is the first mysql_num_rows returns the correct number of rows for that date, however, the subsequent rows return 0 rows where in reality there is more than 0.
  4. I'm creating a calendar which retrieves a list of dates specified in a file and compares that to the dates in the database that are already scheduled. The problem is I am not very well educated in PHP and MySQL therefore not sure why the following code only returns the correct number of rows for the first date, yet does not for any of the subsequent dates. As a side note, in this code we're being connected to the database many times, however I've also tried connecting to the database outside the loop - which didn't make any changes. Any help greatly appreciated! <?php //file to retrieve dates $filename = "datelist/aprildates.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd,filesize ($filename)); fclose ($fd); $delimiter = ";"; $splitcontents = explode($delimiter, $contents); //commented out temporarily - echo "<select name='reservedate'>"; foreach ( $splitcontents as $date ) { //connect to db $link = mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db ("slots") or die(mysql_error()); $query = mysql_query("SELECT * FROM slotinfo WHERE date = '$date'", $link) or die(mysql_error()); $numrows = mysql_num_rows($query); //testing to see query results echo $date." "; echo $numrows."<br/>"; //if less than 5 dates in db, then echo the option to select that date if ($numrows > 5) { } else { $date2 = date('l, M d, Y', strtotime($date)); //commented out temporarily - echo "<option value='$date'>$date2</option>\n"; } mysql_close($link); $link = null; } //commented out temporarily - echo "</select>"; ?>
  5. Hi guys, I'm looking for a jeopardy script for my site as a school project and am wondering if anyone knows something like this or has experience in this. I dont exactly need it to necessarily be in PHP, if someone has done a jeopardy game in something else, im open to that too. Thanks
  6. Hi, I've been looking around lately for incentive scripts where I can have affiliate companies linked onto my site and I earn commission for getting users to fill out offers. A similar site is http://inboxdollars.com and a site I found that sells this type of script is http://incentivesitescript.com/index.php?main_page=product_info&products_id=1 and it requires Cpanel hosting. Does anyone know where I could get a script like this or how much would it cost to have a custom one made? I'm looking for something where a person can complete offers and get paid for it...so instead of receiving a price, they receive the option to turn the points they’ve collected into paypal, check, or some gift certificate. If you guys know of something similar to this, please let me know. Thanks:
  7. Im looking for a cms that allows me to upload and organize music and albums so people can listen to them. Is there a CMS that anyone can think that would work for this such as Joomla, phpnuke, or drupal? Note: the mp3s on my site will be foreign music and it is perfectly legal as the christian music I want to host isnt copyrighted. thx
  8. great idea dude, sorry I cant test it, but nonetheless, great site...if you get yourself a better connection or buy a box somewhere this thing would be major.
  9. is there an email verifier script that checks that the email does exist? not just a validator. I need a verifier. Thanks
  10. I need to create a bbcode for one of my websites, but still quite difficult for me since I dont know anything about php and will get the book in a couple weeks. I know some php functions and the general idea of how it works, but need the exact syntax. I need it so if a guest comes to my site, then they need to click on the banner to see the hidden content. If it is a registered member, then they just see the hidden content. So basically when a guest comes, they have to click on the ad to see the hidden content. The ad dissappears and theres the hidden content. This is what I have so far. <php $adcode = '<iframe allowtransparency="true" src="http://mysite.com/banner.php" width="468" height="60" onload="javascript:var o=this;var l=o.contentWindow.length;var s=0;if(l>0){s=l;}else{j=1;for(var i=0;i<32;+... style="border:0px;margin:0px;overflow:hidden" frameborder="0" scrolling="no"></iframe>'; if(USER) { return $code_text; }else{ return $adcode; if <<Guest clicks on ad, then << Guest sees $code_text </?> The '<<' areas are what I need help on...if I am doing this whole thing the wrong way, please explain and help me out. Thanks...much appreciate this forum.
×
×
  • 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.