Jump to content

oracle259

Members
  • Posts

    119
  • Joined

  • Last visited

    Never

Everything posted by oracle259

  1. Well you could use your php environmental variables to capture the users ip address, the timestamp, and last page visited and store the information in a mysql database then run a search ordered by timestamp. Checkout the following link for some ideas http://www.php.net/manual/en/reserved.variables.php Be sure to check out REMOTE_ADDR and HTTP_REFERER
  2. [quote]<form action="parsethis.php?id=45XYZ" method="POST"> [/quote] should be [code]<form action="parsethis.php?id=45XYZ" method="GET">[/code] if you want to use POST use: [code]$id = $_POST['id'];[/code] or you can use the following code for both GET and POST [code]$id = $_REQUEST['id'];[/code]
  3. ok try this [code] $result = @mysql_query("SELECT * FROM t_50 ORDER BY name ASC");   $adcount = 0; while ($row = mysql_fetch_assoc($result)) {   $letter = strtoupper(substr($row['name'],0,1));       if ($letter != $header) {       print "<p/><b><u>";  echo  "<a href=#>$letter</a>"; print "</u></b></p>";     } if ($adcount <4) {     echo "<br/><a href=index.php?movie=".$row['id'].">".$row['name']."</a>";   $adcount= $adcount+1; } else {     echo "<br/><a href=index.php?movie=".$row['id'].">".$row['name']."</a>";       echo "Display ad";     $adcount = 0;   }   $header = $letter; } [/code]
  4. try this [code] $result = @mysql_query("SELECT * FROM t_50 ORDER BY name ASC");   $adcount = 0; while ($row = mysql_fetch_assoc($result)) {     if($letter != substr($row['name'],0,1)) {       $letter= substr($row['name'],0,1); print "<p/><b>";  echo  "<a href=#>$letter</a>"; print "</b>";     } else { if ($adcount >=4) {     echo "<br/><a href=index.php?movie=".$row['id'].">".$row['name']."</a>";       echo "Display ad";     $adcount = 0; } else {     echo "<br/><a href=index.php?movie=".$row['id'].">".$row['name']."</a>";   $adcount= $adcount+1;   } } } [/code]
  5. try this [code] <?php $ipaddy = $_SERVER['REMOTE_ADDR']; $ipaddy = str_replace(".","",$ipaddy); $query = "SELECT DISTINCT(ip) FROM ipbase WHERE ip=$ipaddy"; $result = mysql_query($query) or die("mysql error: " . mysql_error()); while ($line = mysql_fetch_assoc($result)) { $ipad = $line['ip']; if ( $ipad == $ipaddy ){ echo "Welcome ".$ipaddy;             } else {                       echo "Welcome Guest"; $query = "INSERT INTO `ipbase` (`ip`) VALUES('$ipaddy')"; $result = mysql_query($query) or die(mysql_error()); }                       } mysql_free_result($result); ?> [/code]
  6. How can i modify and/or delete a cron job using php? Is it even possible?
  7. Without seeing more of ur code I think u should do the calculation outside of the link and echo the result in the link like this [code] $plus = $rec_Recordset1['id'] + 1; $minus = $rec_Recordset1['id'] - 1; <div align="center">   <div id="image_navigation"> <a href="gallery.php?id=<?php echo        $minus; ?>"><img src="../images/previous.jpg" border="0" />[/url]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="gallery.php?id=<?php echo $plus; ?>"><img src="../images/next.jpg" border="0" />[/url]   </div> </div> [/code]
  8. Thanks. How do i modify or delete the cron job within php though
  9. Is there anyway to set up a cron job from within php itself. If so how?
  10. I think mjdamato has it right its much safer to store the user and password variables in a separate file eg. source.ini.php then upload this file outside of web browser path. When u need them just include the file. But i guess u can also combine what ur doing with this approach but i dont see what extra security values it provides...well maybe to someone who might not know what their looking at. Doubt it but stranger things have happened  ;)
  11. This still doesnt solve the undelying problem as thorpe said [quote] Still, you going to need to set these variables somewhere.[/quote]
  12. always wanted to learn how to create recurrent events is there a tutorial that does a good job of teaching this.
  13. i think the last post should work but i would make the following modification [code] SELECT itemName,itemId,itemPrice,itemSmall FROM `products` WHERE itemDesc like "%$descvalue%" OR (itemName like "%$descvalue%" OR itemId like "%$descvalue%") [/code]
  14. This link [url=http://www.php.net/manual/en/reserved.variables.php]http://www.php.net/manual/en/reserved.variables.php[/url] can explain better i think. But basically it allows you to retrieve the variable $id whether using Post in the case of a form or Get in the case of a url like your doing
  15. sorry that should be [code] echo "<a href='example.com?id=$id'>$title</a>" . "<a href='example.com?id=$id'>$category</a>" . "<a href='example.com?id=$id'>$location</a>" . "<a href='example.com?id=$id'>$salary</a>"; [/code]
  16. use this [code] echo "<a href='example.com?id=$id'>$title</a>" . "<a href='example.com?id=$id'>$category</a>" . "<a href='example.com?id=$id'>$location</a>" . "<a href='example.com?id=$id'>$salary</a>"; [/code]
  17. correct  $trackid= trim($_REQUEST(['id']);  to [code] $trackid= trim($_REQUEST(['id'])); [/code]
  18. if im right try this code [code] <? include 'config.php'; include 'opendb.php'; ?>     <?     $trackid= trim($_REQUEST(['id']);       $trackid = mysql_real_escape_string($trackid); $query  = "SELECT title, category, salary, location FROM joborder WHERE number='$trackid'"; $result = mysql_query($query); while(list($id,$title,$category,$salary,$location)= mysql_fetch_row($result)) { echo "<a href="example.com?id='$id'"><b>$title</b></a>" . " - $category" . " , $location" . ", $salary"; } ?> [/code]
  19. Im not certain if i understand exactly what ur tryin to do but here goes Basically u want the rows generated by the mysql result to be clickable by headers (title, id, description, salary, location, etc) and all these headers must point to the single id whatever that is Am i on the right track
  20. Thanks this helps more than u know
  21. no no I want to know if i can submit a form using a text link similar to how a submit button does it
  22. just a regular for with a text, password and hidden fields. the data is being sent to a different page
  23. How can i submit a form using a text link
  24. I recently filled out a form. When i clicked on the submit button it became disabled and a message "Processing...." shown. How can i do this.
  25. But wouldnt i have to click send to post the info. I need a way to log the inputs as they are typed
×
×
  • 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.