Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. ok I don't quite understand you coz now you've confused me.. you want your RESULTS that you OUTPUT to start counting itself E.G. item_1 item_2 starting from 1? can you link me to the page that this is happening on.. and tell me what should be different, because I'm at a loss right now..
  2. you can do this in php or javascript php: <?php function removeAllOther($var,$key,$let) { $letter = $var{0}; if (strtolower($letter) == strtolower($let)) return true; return false; } $array = array("Apple","Ant","Bat","Ball"); $ord = $_GET['ord']; if (strlen($ord) == 1) { // sorry I like to use strlen for variable checks :S sue me array_filter($array,"removeAllOther",$ord); print_r($array); } ?> ^^ for the above make all links look like: http://whatever.com/whatever.php?ord=a or b or c etc javascript code: <script type="text/javascript"> var list; function sortIt(ord) { e = document.getElementById("results"); if (!list.length) { list = e.getElementsByTagName("p"); for (a in list) { list[a] = list[a].innerHTML; } } e.innerHTML = ""; for (i in list) { if (list[i].toUpperCase().substr(0,1) == ord.toUpperCase()) { p = document.createElement("p"); p.appendChild(document.createTextNode(list[i])); e.appendChild(p); } } } </script> <div id="results"> <p>Apple</p> <p>Ant</p> <p>Bat</p> <p>Ball</p> </div> <a href="javascript:sortIt('A');">A</a> <a href="javascript:sortIt('B');">b</a>
  3. you could just do.. for($x = 0;$x < $number;$x++){
  4. if it is a remote server connection, try using your IP, again I neverworked with mssql b4 so I hope this helps
  5. there is other methods you can use such as .htaccess but this is probably the most simple
  6. okay first I want to recap: $proname looks like it would be "first name" I want to just make it clear that it is possible for people to name their kids their same name.. like Russell Crevatas, Senior Russell Crevatas, Junior I'm stil not completely sure what this should be doing.. but you want everybody with the same last name, but not the same first name?
  7. subdomain or not your webserver will try to provide a landing page for the client: index.html, default.html depending on how you set up apache/whatever server you use.. that being said you can ASSUME that 123.whatever.com will automatically land on 123.whatever.com/index.php inside index.php put this: <? header("location: store.php"); ?>
  8. whatever element your ajax is filling.. thats the element you set it's property .innerHTML to ""
  9. ok.. mssql_connect however I looked up MS SQL EXPRESS and PHP on google and below are some links I've come across.. good luck http://www.interaktonline.com/Products/Free-Products/PHAkt/Product-Forum/Details/99999/MyNotes+-+Connection+Setup+to+MS+SQL+2005+Express.html?last=1 http://razasayed.wordpress.com/2008/03/09/connecting-to-sql-server-2005-express-using-php/
  10. From what I gather you want a database manager type vb client, now, I'm sure VB can connect to a mysql database, I could of swore I've seen an example somewhere.. If you don't know mysql OR vb, then you've probably got a long while before you could complete this goal.. I humbly suggest you search on google "Connecting to mySQL through VB" or something similar to that.. You also need to make sure your database allows remote connections.. like someone stated above you should find out how at http://www.mysql.com google is your friend
  11. even though this is solved, I thought I might add something which could be of use to you later on.. <?php function addQuotes(&$val) { $val = "\"".addslashes($val)."\""; } $array = array("mark","jack","jimmy","susan"); array_walk($array,"addQuotes"); echo implode(",",$array); ?>
  12. you're saying it keeps adding the data below alrdy filled elements.. your onclick event handling function inside there do like theElement.innerHTML = ""; that way it empties the element before putting more content into it.
  13. cwarn a much easier (less redundant) option is to add .htm and .html to PHP's extensions AddType application/x-httpd-php .html .htm ^^ add that into your .htaccess file and all your .html and .htm files will evaluate php
  14. you can use pack to pack a NULL byte into a string.. but returning NULL or just using "null" in your mysql query should be enough to satisfy mysql =\ actually you don't even have to SPECIFY the field if it will be null
  15. this must be ABNORMALLY slow try the IN operator in mysql its specifically designed for arrays imploded by , ofcourse try this: <?php $tempNAME = $_SESSION['Username']; $Deck = str_replace("\n",",",trim($_SESSION['Pokemon1'])); $result = mysql_query("SELECT `Name`,`id` FROM `CapturedCards` WHERE `id` IN ('{$Deck}') AND `Owner` = '{$tempNAME}'"); while ($row = mysql_fetch_array($result)) { echo "<pre>TESTING\n".print_r($row,true)."</pre>"; } ?>
  16. Please click SOLVED at the bottom
  17. while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; } I'm assuming thats where the values r handled.. while (list ($key, $val) = each ($HTTP_POST_VARS)) { if ($val != 0) $mailbody .= "$key : $val\n"; }
  18. you could use mktime to generate a timestamp for that month/year and then use mktime again to generate the END of that month in conjunction with date then do WHERE `timestamp` > '{$startDay}' AND `timestamp` < '{$endDay}'
  19. if they always supply "http://" then you could do strpos() for "http://" and then another strpos() for a " " (space) and then substr() the difference references: strpos substr
  20. document shouldn't be undefined.. lol that is a biiig error
  21. wow redarrow lol daz alotta posts and for this guy's question : why would you ever want to use anything other than file_get_contents file or cURL for external data grabbing..
  22. not sure, I looked over your code and line 96 isn't anything to do with javascript.. the image preloader opensource you have will probably not affect IE, but sumfin I did look @ (didn't investigate) is the only other script tag you have, is the s_loader.js you have.. remove that and see if the error still happens
  23. 50 loops is not a problem php does that in a matter of miliseconds $rPD = mysql_query($qPD) or diue (mysql_error()); is probably your problem
  24. please click SOLVED @ the bottom of the post
×
×
  • 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.