RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
[SOLVED] Filling forms (sorry, a bit vague, I know)
RussellReal replied to Rohlan's topic in PHP Coding Help
<?php // clients.php $page = $_GET['page']; // mysql_connect... ~ fill in your mysql information $q = mysql_query("SELECT * FROM `clients` LIMIT ".(($page - 1) * 20).",20"); while ($f = mysql_fetch_assoc($q)) { echo $f['clientName']."\n"; } ?> <!-- PAGE WHERE CLIENT PAGE LIST SHOULD BE.. --> <script type="text/javascript"> var a; function pushList() { clientList = document.getElementById("clientList"); if (a.readyState == 4) { list = a.responseText.split("\n"); for (i in list) { div = document.createElement("div"); div.appendChild(document.createTextNode(list[i]); clientList.appendChild(div); } } } function pageChange(num) { try { a = new XMLHttpRequest(); } catch (e) { try { a = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { a = new activeXObject("Microsoft.XMLHTTP"); } catch (e) { return null; } } } a.onreadystatechange = pushList; a.open("GET","rawra.php?echo=true",true); a.send(null); } </script> <div id="clientList"></div> <a href="javascript:pageChange(2);">PAge 2</a> <a href="javascript:pageChange(3);">PAge 3</a> <a href="javascript:pageChange(4);">PAge 4</a> please note I wrote this directly into the post box and I havn't tested it.. -
executing and running a windows media player video
RussellReal replied to hammerklavier's topic in PHP Coding Help
this is not done with php.. completely html.. 1 sec I'll find it http://www.mioplanet.com/rsc/embed_mediaplayer.htm -
this is done with javascript.. lol
-
yeah.. <input type="password" name="password" id="p" /> document.getElementsById("p").value will return normal text not the ****s the reason its considered more 'secure' is because it disallows nosy people from seeing your passwords..
-
uhh yeah.. I gave it to you.. $value = "FirstName"; $row_members['FirstName'] = "Sam"; $excel_string = $row_members[$value]; echo $excel_string; // dipslays as $row_members['FirstName'] echo "<br />"; echo $row_members['FirstName']; // displays as Sam
-
[code]<? if (isset($_GET['mode'])){ if ($_GET['mode'] == "img") { header ("Content-type: image/jpeg"); header('Content-transfer-encoding: binary'); putenv('GDFONTPATH=' . realpath('.')); $image = $_POST['image']; $text = $_POST['usertxt']; $txt_color = ImageColorAllocate($img_handle, 0, 0, 0); $font = 'arial'; $img_handle = @ImageCreateFromJPEG((($image == "shout")? "domotalk":"domonews").".jpg"); if ($image == "shout") { $newtext = wordwrap($text, 17, "\n", 1); ImageTTFText($img_handle, 14, 0, 207, 62, $txt_color, $font, $newtext); } else{ $newtext = wordwrap($text, 20, "\n", 1); ImageTTFText($img_handle, 14, 0, 280, 75, $txt_color, $font, $newtext); } ImageJPEG ($img_handle,NULL,95); } } ?>[/code] only problem I can see is $font is being set to 'arial' and 'arial' is not a font file.. the font parameter for imagettftext is a FONT FILENAME yes I know this post is over 2 yrs old.. whatever.. I'm bored
-
what field in your database is their "number"?
-
does that answer your question? lol
-
r u looking for mysql_num_rows()?
-
I'm sorry dude.. I messed up try this $value = "FirstName"; $q = "'"; $row_members['FirstName'] = "Sam"; $excel_string = $row_members[$value]; echo $excel_string; // dipslays as $row_members['FirstName'] echo "<br />"; echo $row_members['FirstName']; // displays as Sam please note the quotations.. single quotes DO NOT evaluate variables and special characters.. doubel quotes EVALUATE variables and special characters
-
try this bro instead of $excel_string = '$row_members['.$q.$value.$q.']'; try $excel_string = $row_members["$q$value$q"];
-
I've done something like this.. its probably not the most efficient way.. but its a way I know to do it.. after you collect the data from the database lets say you put the data into a variable called like $data you could do something like <?php // do all the mysql stuffslol make sure $data has the google maps code or w\e if (!is_dir("temporaryDirectory")) { mkdir("temporaryDirectory"); } $file = "temporaryDirectory/".md5($_SERVER['REMOTE_ADDR'].rand(1,50)).".php"; $tempFile = fopen($file,'w'); fwrite($tempFile,$data); fclose($tempFile); ob_start(); include($file); $contents = ob_get_clean(); ob_end_clean(); unlink($file); // now put $contents wherever you want your map thingy to show up ?>
-
<? $packages = array("ult","sngl","mnth","ssn","po","spl"); while ($a = mysql_fetch_assoc($q)) { $packages[array_search($a['package'])] = array( $a['package'] => $a['picks'] ); } print_r($packages); ?> idk if this is exactly what you need.. but here ya go
-
well thats the thing in programming, wherever you want it to show up, thats where you'd make it show up, however.. getting the data shouldn't be too hard.. lemme do a quick lookup.. *looks up* doo dooo dooo... lol http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000316.html
-
please click the little 'solved' button ty
-
yeas but I'm gonna work something out here for you.. sorry I was away for a little while
-
use $_REQUEST to get the information.. and putthe text where you'd put the static text
-
uhh.. tables.. uhh.. include().. uhh.. iframes where you need em.. uhh.. tables..lol
-
<frameset rows="*,10" cols="*" framespacing="0" frameborder="no" border="0"> <frameset cols="260,*" frameborder="0"> <frame src="menu.php" name="left" noresize="noresize" /> <frame src="main.php" name="main" /> </frameset> <frame src="playonline.php" /> </frameset>
-
http://php.net/imagestring and also.. in the lil examples on there they use imagecreate() {http://php.net/imagecreate} however, you can use imagecreatefromjpeg imagecreatefrompng imagecreatefromgif { http://php.net/imagecreatefromjpeg http://php.net/imagecreatefrompng http://php.net/imagecreatefromgif } to create an image resource with the width/height/image of the template file I hope I helped
-
convert date from US to UK from a string got from mysql
RussellReal replied to newbeee's topic in PHP Coding Help
what timezone is the UK and what timezone in the US are you trying to do.. if lets say UK is +0 GMT and you want the US timestamp to be -5GMT just do.. strtotime($rows['created_on']." -5 hours");