Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. sorryy made a mistake above, but I just modified it to make it work
  2. yes you can.. E.G.. <? if (whatever == lolol) { ?> <script type="text/javascript"> lalalal </script> <? } else { ?> <script type="text/javascript"> OMG LOL! </script> <? } ?>
  3. <?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..
  4. this is not done with php.. completely html.. 1 sec I'll find it http://www.mioplanet.com/rsc/embed_mediaplayer.htm
  5. this is done with javascript.. lol
  6. 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..
  7. 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
  8. [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
  9. what field in your database is their "number"?
  10. does that answer your question? lol
  11. r u looking for mysql_num_rows()?
  12. no dude.. it is SO impossible.. what the image generating script does is simply output an image.. outputting an image is outputting code if you output the html with the image the image gets messed up.. just leave it in the other file and do <img src="whatever.php">
  13. you're having the problem because editpic.php must actually return an IMAGE firstly.. you cannot send a header after the output of the body.. secondly.. you can't generate an image mid page.. the<img> tag is meant to LINK to OTHER FILES
  14. 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
  15. try this bro instead of $excel_string = '$row_members['.$q.$value.$q.']'; try $excel_string = $row_members["$q$value$q"];
  16. 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 ?>
  17. <? $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
  18. 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
  19. please click the little 'solved' button ty
  20. yeas but I'm gonna work something out here for you.. sorry I was away for a little while
  21. use $_REQUEST to get the information.. and putthe text where you'd put the static text
  22. uhh.. tables.. uhh.. include().. uhh.. iframes where you need em.. uhh.. tables..lol
  23. <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>
  24. 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
  25. 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");
×
×
  • 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.