Jump to content

Skittalz

Members
  • Posts

    48
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Skittalz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Try using the PHP ereg function Its explained here http://us.php.net/ereg Cheers
  2. Or he could use javascript which does what he wants it to do effectively without any errors and without reconstructing his program. Why make this harder then it needs to be?
  3. Yes, but it must be called before any actual output is sent. There are alot of instances in which this is the case... so in those instances javascript would be key ... I believe the author of this post must have ran into on of these instances hence why he asked an alternative way to forward pages
  4. aren't = are not now try reading this post again
  5. Lol if you want to get technical he said ahem in - not with I also find it amusing your critiquing me for using javascript when we are in the javascript forum ... I think the author was trying to say something ... Meta tags aren't php????
  6. Nevermind I figured it out The problem was I was using single quotes (') around the field name when I shoulda been using a grave accent (`) .... good ole php n mysql
  7. <META> Tags aren't PHP either .... just trying to be creative and help someone out ... but yeah Xurion, thinkin inside the box usually solves the problem
  8. @mysql_query("UPDATE statistics_past SET '".$id."' = '".$row['w_views']."' WHERE id = '" . mysql_real_escape_string($Mr). "'"); This MySQL doesn't work
  9. When using a MySQL UPDATE, is it possible to use a variable as the field name as well as a variable for the field value? My field name is in a loop and I am trying to update my MySQL column values... Heres my code @mysql_query("INSERT INTO statistics_past(`startdate`) VALUES ('".date("Y-m-d H:i:s")."') "); $sql = mysql_query("SELECT * FROM statistics_past"); $Mr = mysql_num_rows($sql); $result = mysql_query("SELECT * FROM statistics"); while($row = mysql_fetch_array($result)) { $id = (int) $row['id']; echo $Mr. " - ".$id; @mysql_query("UPDATE statistics_past SET '".$id."' = '".$row['w_views']."' WHERE id = '" . mysql_real_escape_string($Mr). "'"); } @mysql_query("UPDATE statistics_past SET `enddate` = ('".date("Y-m-d H:i:s")."') WHERE id = '" . mysql_real_escape_string($Mr - 1). "'"); Any help would be appreciated ... I've been looking at this code for to long ... Thanks! Steve
  10. Yes there is buddy <?php // Put this code in the header of your HTML file * Edit PHP as needed// echo "<script language=\"Javascript\"> function forward(){ location.href="http://www.website.com"; } </script>"; To forward when a user clicks a button, in the button tag include -- onClick = "forward()"; To forward automatically after so many seconds add this to the body tag onload=setTimeout('forward()',5000) Where '5000' means 5 seconds [1000 = 1 sec] Hope this helps Steve
  11. Add a variable could be a quick fix. $z = 0; if ($handle = opendir($dir_path)) { while (false !== ($file = readdir($handle))) { if (eregi("\.". $doc_types ."$", $file) || eregi("\.". $xls_types ."$", $file) || eregi("\.". $pdf_types ."$", $file)) { $tmp_file_path = $dir_path . $file; print "<img src=\"images/word_icon.jpg\"> <b><a href=\"$tmp_file_path\">$file</a></b><br>"; } else if($z == 0) { print "No Agendas or Minutes available. Please select another year."; $z = 1; } } closedir($handle); } Cheers, Steve
  12. if ($ir['new_mail'] > 0) { echo '<body onLoad="disp_alert();">'; // you can add anything else you want to the body tag } else { echo '<body>'; } this should only be on the page they read their email
  13. Whats the error message? Steve
  14. include this in the header <script type="text/javascript"> function disp_alert() { alert("You have 1 new mail"); } </script> And then this would be needed for your <body> tag <?php if ($ir['new_mail'] > 0) { echo '<body onLoad="disp_alert();">'; // you can add anything else you want to the body tag }
  15. I'm confused.. what is below the line and where does the php end --------------------------------------------------------------------------------
×
×
  • 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.