Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. $_SESSION[ic] is incorrect, yes it works but its wrong, unless ic is a constant, but as its not a constant php corrects it but will give a notice error (mild warning), use $_SESSION['ic'] instead (good habbit)
  2. erm.. it should! try this regex (for multilines) $newData = preg_replace('%(.*)(?:http://intranet/portal)(.*)%sim', '$1http://iportal/home$2', $Data);
  3. wasn't sure if ownerid was a reserved word the {} same the ".var." and the Serialnum is an int not a string so no quotes needed
  4. do print_r($houserow); below the echo
  5. Sighs mysql_query("UPDATE gamecard SET `Ownerid`= '{$_SESSION['ic']}' WHERE Serialnum =$cardID") or die(mysql_error());
  6. Bad move.. the only thing i can think of is increased development time due to a learning curve!
  7. $GetHouseInfo = mysql_query("SELECT * FROM houses WHERE UserID='{$_SESSION['Current_User']}'") or die(mysql_error());
  8. erm ok <?php $image = "http://#############.net/../#######/CSS/logo.png"; echo "<img src='$image' />"; //displays list($width , $height) = getimagesize($image); //fails echo "w:$width, h:$height"; ?> EDIT: removing the "/.." fixed it as the path was invalid to PHP but corrected by the browser
  9. What happens if the host restricts 50 and you try 51? if an error what error ? i just want to know as i havnt had this problem but if theirs no error then atleast i can be aware of it,
  10. try this $image = "image.jpg"; if(file_exists($image)) { list($width , $height) = getimagesize($image); echo "w:$width, h:$height"; }else{ echo "file not found"; }
  11. your "more familiar to use php than python".. why is that a problem?!!! ??? ??? EDIT: nevermind
  12. option #2 (as a backup) $x = min($totalPages_Recordset1, $pageNum_Recordset1 + 1); echo "<a href=\"javascript:llamarasincrono('$currentPage?pageNum_Recordset1=$x$queryString_Recordset1', 'commentarios');\">Next</a>";
  13. try this echo "<a href=\"javascript:llamarasincrono('".printf('%s?pageNum_Recordset1=%d%s', $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1)."', 'commentarios');."\">Next</a>";
  14. you don't have OwnerID field your using IC mysql_query("UPDATE gamecard SET IC= '".$_SESSION['ic']."WHERE Serialnum ='$cardID'");
  15. erm.. what are you asking ? why should you use PHP over Python ? look here Google is your friend
  16. Humm.. well the manual seams to have suite quite well, a book can be just another lite of Tutorials..! the understanding of why it works is important.
  17. cool can you please click Topic Solved (bottom left) lucky i know Mac's
  18. Basic idea <?php //SQL stuf $SQL = "SELECT field FROM table WHERE field LIKE %http://site1/directory%;"; $updateSQL = ""; //loop each record while($row = mysql_query($SQL)) { $ID = $row['id']; $newData = preg_replace('%(.*)(?:http://site1/directory)(.*)%i', '$1http://site2/directory$2', $Data); $updateSQL .= "UPDATE table SET field = '$newData' WHERE ID = $ID;"; } mysql_query($updateSQL); ?>
  19. Oh yeah if your using TextEditor 1. Select TextEdit from the menu and select Preferences. 2. Under New Document Attributes, select Plain text. 3. Under Saving, uncheck append ".txt" extension to plain text files. 4. Close the Preferences window. create a NEW file and copy the details from eailer post and save over the existing config.php
  20. Okay.. are you uploading via FTP ? (as that solves the CR problems) personally i would use BBedit on a Mac (or BBedit lite)
  21. "a text editor" doesn't tell me much.. Ms Word is a "text editor"/"word processor" but that can really mess things up.. does the editor have a name ? is it an online one ? does it have other "modes"
  22. nothing wrong with the script.. infact it looks like a mod of an force download old script i posted FTP in and check the file your attempting to download
  23. the reason i ask, is because the code is fine but the editor is probably messing it up.. can you edit in text only mode ( or source)
  24. using either itsmeArry or my code (as their the same) can you paste that into notepad and save it and upload it what editor are you currently using?
×
×
  • 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.