RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
[SOLVED] links <a href="steam: and teamspeak:
RussellReal replied to Birdmansplace's topic in PHP Coding Help
Anytime, btw, the names Russell -
ok well.. a word of advice.. have a date field also or just in that field include the date.. that way you don't have a major guessing game.. unless you already do CLOCK IN 02/31/1990 8:30:01 AM CLOCK OUT 02/31/1990 5:30:01 PM can you show us the structure or just a print_r of a result from the table.. so that we can work out an effective way for you to achieve this?
-
ok easy.. lets assume.. $_GET['date'] equals 02/31/1994 $previous = date("d/m/Y",strtotime("{$_GET['date']} -1 month")); $next = date("d/m/Y",strtotime("{$_GET['date']} +1 month"));
-
change print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber     "; print "<span class=\"darkgreen\"> Issue with:</span> $machine    "; print "<span class=\"darkgreen\"> Solution: </span> $action <br />   <br /><br />"; to print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber     "; print "<span class=\"darkgreen\"> Issue with:</span> $machine    "; print "<span class=\"darkgreen\"> Solution: </span> $action <br />   <br /><br />"; print "<a href='expandInfo.php?jid={$jobnumber}' class=\"darkgreen\">Expand Info</a><br />"; then create a file called expandInfo.php and use $_GET['jid'] as the job number to form your next query.. Russell
-
http://lovinglori.com/message.php <?php // messages.php if (isset($_POST['message'])) { if (file_exists('messageCount.txt')) { $count = fopen('messageCount.txt','r+'); $n = fread($count,1024); } else { $count = fopen('messageCount.txt','a+'); $n = 0; } if (($e = ($n + 1)) <= 10) { rewind($count); fwrite($count,$e); fclose($count); $fp = fopen('messages.txt', 'a'); fwrite($fp, "{$_POST['message']}<br />"); fclose($fp); } } readfile('messages.txt'); ?> <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> <input type="text" name="message"> <input type="submit" value="SUBMIT"> </form>
-
[SOLVED] links <a href="steam: and teamspeak:
RussellReal replied to Birdmansplace's topic in PHP Coding Help
o shoot sorry.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body")[0].appendChild(ifr); d.getElementsByTagName("body")[0].removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a> -
<?php if (isset($_GET['message'])) { $count = fopen('./messageCount.txt','r+'); $n = fread($count,1024); if (($e = ($n + 1)) <= 10) { rewind($count); fwrite($count,$e); fclose($count); $fp = fopen('./messages.txt', 'a'); fwrite($fp, "{$_GET['message']}<br />"); fclose($fp); } } readfile('./messages.txt'); ?>
-
now you want to have them in order? do ORDER BY MemberCount
-
okay, click the little 'solved' option at the bottom
-
[SOLVED] links <a href="steam: and teamspeak:
RussellReal replied to Birdmansplace's topic in PHP Coding Help
no.. this is also javascript try this.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body").appendChild(ifr); d.getElementsByTagName("body").removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a> -
send the table please
-
they go into the email header info mail
-
when the 'connection' drops, does your server crash, or php just exits? I know a socket would consist of a loop try at the end of every loop.. put simple functions at the bottom and just watch the output echo socket_strerror(socket_last_error()); var_dump($socket_handle); how do you "know" the socket drops per-say? per loop do you re-open a mysql connection? if so you can be crashing your server.. if you're NOT using a server.. disregard the above lol.. idk what else to say, your socket shouldn't die.. maybe show us the script? hide any valuable information, or PM it to me if its sensitive and you don't want any1 to see it. I've worked on a few servers so far and I'm sure I could help lol if anything, at the very least, I hope you resolve your problem
-
change both buttons to <input type="button" value="OK" onclick="disp_confirm(this.value.toLowerCase())" and <input type="button" value="CANCEL" onclick="disp_confirm(this.value.toLowerCase())"/> then have a function function disp_confirm(v) { if (v == 'ok') { // do whatever for OK } else if (v == 'cancel') { // do whatever for CANCEL } else { alert("Error: Invalid button"); } } btw this is a javascript question and will most likely get moved..
-
but bro.. if you already KNOW you want <b> why not just use <b> unless you want the contents that are inside <b></b> in which case you can use preg_match or substr + strpos the second option is actually TONS faster
-
preg_replace("/<img[^>]+?>/","",$html,1);
-
[SOLVED] PHP MySQL update script not working
RussellReal replied to bschultz's topic in PHP Coding Help
Not sure what you mean but if you understand what you did wrong than I guess it doesn't matter free post for me too Good job at fixing ur script -
trudat revraz and php isn't even hard tsk tsk
-
[SOLVED] extracting information from array
RussellReal replied to ubunken's topic in PHP Coding Help
array_search already returns the key.. $arr[0] = 'I am a boy'; $arr[1] = 'I am a girl'; $arr[2] = 'I am a mom'; $search = array_search("boy", $arr); $who = explode(" ", $arr[$search]); print_r($who); -
regex is slow use strpos with substr example: <?php $d = file_get_contents("http://theWebsite.com/file.php"); $tag = "<h1>"; $s = strpos($d,$tag) + strlen($tag); $e = strpos($d,"</".substr($tag,1),$s); $content = substr($d,$s,$e - $s); ?>
-
curl and file_get_contents will bring the output of Y to X if used on X.. to REDIRECT your user to Y you could use the header function header("location: Y");
-
[SOLVED] stop the $_POST function when refresh
RussellReal replied to homer.favenir's topic in PHP Coding Help
that I must say is pretty slick