RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
Isolating single or double digit fret numbers in guitar tabs
RussellReal replied to alpineapple's topic in PHP Coding Help
<?php $Ehighnote = array('E','F','F#','G','G#','A','A#','B','C','C#','D','D#','E'); echo preg_replace("/(\d+?)/e",'\$Ehighnote["\1"]',"-1--1--3-3--3-3-3-3-3--"); ?> -
Isolating single or double digit fret numbers in guitar tabs
RussellReal replied to alpineapple's topic in PHP Coding Help
regex give me 2 minutes -
[SOLVED] PHP MySQL update script not working
RussellReal replied to bschultz's topic in PHP Coding Help
you could also do <?=$row['row_number'];?> -
[SOLVED] stop the $_POST function when refresh
RussellReal replied to homer.favenir's topic in PHP Coding Help
check the http_referer? I will run a few tests.. and get back to you in a moment ok that doesn't work.. lol -
strtoupper() inside a preg_replace()
RussellReal replied to The Little Guy's topic in PHP Coding Help
they are basck references \0 will be the whole string captured inside of the pattern.. \1 would be the first capturing group \2 wouldbe the second \3 would be the third.. etc capturing groups are ( ) and non-capturing groups are (?: ) -
strtoupper() inside a preg_replace()
RussellReal replied to The Little Guy's topic in PHP Coding Help
<?php $a = "hello how ArE you?"; echo preg_replace("/\b(are)\b/ie","strtoupper('\\1')",$a); ?> you need the /e modifyer I guess it stands for "eval" lol -
strtoupper() inside a preg_replace()
RussellReal replied to The Little Guy's topic in PHP Coding Help
try \0 instead of $0 but I'm going to do a few tests right now and get back to you wait like 2 mins unless sum1 smarter than me gets to it first lol -
[SOLVED] Access Variables in included files
RussellReal replied to Nixeon's topic in PHP Coding Help
http://lovinglori.com/file3.php I did the exact same thing file1 sets $var1 file 2 echoes $var1 file3 includes both and output is exactly how it should be.. -
[SOLVED] Access Variables in included files
RussellReal replied to Nixeon's topic in PHP Coding Help
WELL 1 thing I can say is.. name your file install_settings.config.php including a txt file does the same as including a .php, however... If a user does yoursite.com/install_settings.config they'd get alot of information about your site.. and thats never good.. keep it secret.. keep it .php ALSO // config.php $var1 = "hello"; // workit.php echo $var1; // index.php include('config.php'); include('workit.php'); that should display "hello" if it doesn't maybe reinstall php :S idk wat else to say -
ok.. well try this SELECT `count`, count(`number`) FROM `cq_synattr` GROUP BY `number`
-
ok I have an object right lets say sumfin like this: function handleThisEvent() { // HOW do I reference this event's CALLING xmlHTTPRequest object? } function What() { a = new XMLHttpRequest(); a.open("GET","whatever.php",true); a.send(null); a.onreadystatechange = handleThisEvent; } abc = new What(); inside handleThisEvent how would I reference "a" the xmlHTTPRequest object specified in the What object.. without making a global variable equal to "a"
-
<img src="whatever.jpg" id="image" /> <script type="text/javascript"> function resizeImage(image) { vh = window.innerHeight; vw = window.innerWidth; if (""+vh+"" == "undefined") vh = document.documentElement.offsetHeight; if (""+vw+"" == "undefined") vw = document.documentElement.offsetWidth; if (image.width > image.height) { cRat = image.height / image.width; image.height = vh * cRat; image.width = vw; } else if (image.height > image.width) { cRat = image.width / image.height; image.height = vh; image.width = vh * cRat; } else { image.height = Math.min(vh,vw); image.width = Math.min(vh,vw); } } resizeImage(document.getElementById("image")); </script>
-
You could make a file called xmlnews.php and echo like <content> <newsItem> <date>10/25/08</date> <subject>Titanic2 goes down! Rose JR. is a prostitute!</subject> <text>Yeah, when the titanic went down it felt sooooo goood, then a voice came out of no where "Give me $50 dollars...."</text> </newsItem> </content> flash has xml handlers
-
ok bro, well, you don't seem to be understanding me.. so I'll try to explain it 1 more time, not being mean or anything... the URLLoader I linked you to in as3, is like php's file_get_contents function.. which gets the contents of the file.. now.. like you'd parse weather.com to get the weather to show up on your website.. you'd parse your own site.. or make a php file.. which outputs ALREADY PARSED information.. that way when you use the data you parse form this file in flaqsh.. its that much easier.. in flash you need to create text fields for text.. and then you put the parsed data inside the text areas.. you can't just do sumfin like include("your file"); theres no such thing in flash (I don't think) YOu need to parse your data in flash, from 1 of your php files.. then display the data sorry if you don't understand what I'm saying.. I hope someone else will read this and explain it better to you
-
you want the ACTUAL CODE to show up?
-
[SOLVED] Filling forms (sorry, a bit vague, I know)
RussellReal replied to Rohlan's topic in PHP Coding Help
give me a link to the page.. and I'll check it out.. if you have msn add me: RussellonMSN@hotmail.com -
this isn't visual basic.. php uses { and } not THEN and ENDIF just FYI
-
ok your query is messy.. try this.. I'm not sure it'll work.. but it looks like it should: $sql = "SELECT *.city_id, *.max_bet, *.owner_id FROM blackjack JOIN (coinflip,keno,roulette,war,slots,bulletfactory,airport,ironworks) ON ( coinflip.city_id = keno.city_id, keno.city_id = keno.city_id, roulette.city_id = keno.city_id, war.city_id = keno.city_id, slots.city_id = keno.city_id, bulletfactory.city_id = keno.city_id, airport.city_id = keno.city_id, ironworks.city_id = keno.city_id ) WHERE keno.city_id = '{$row['id']'";
-
php returns html.. a text document and an html document are BOTH text documents.. just browsers handle html documents different..