Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Sorry i am having trouble reading the code you supplied.. can you please repost it
  2. looking at the error do you want to post the code for get_connected.php then ?
  3. try echo defined('POWER_WHEELS_INFO'); also require 'includes/const_phrases.php';
  4. oop: PHP4 manual | PHP5 manual | spl | class index | wiki | history | tut | tut | tut | pdf or HERE
  5. Am i the only one still lost here!! PS you should also use the code tags new question why don't use use mail();
  6. <?php echo "sendpageadvisory.php?eric=".$objTask->eric."&clli=".$objTask->clli ?> or is a better standard <?php echo "sendpageadvisory.php?eric=".$objTask->eric."&clli=".$objTask->clli ?>
  7. only think i can see wrong is the ; missing at the end! <?php <a href="javascript:popUp('<?php echo "sendpageadvisory.php?eric=".$objTask->p('eric'); ?>')"> ?>
  8. may wanna double check that, can you post your code
  9. what about changing sendpageadvisory.php to <?php echo "sendpageadvisory.php?eric=".$objTask->p('eric') ?>
  10. isn't that the same as unix timestamps? ie using DEFAULT CURRENT_TIMESTAMP from MySQL ?
  11. please click solved
  12. extended <?php $string = 'Hello [b] how are you [i] how are you [u] how are you [/u][/i][/b] sorry'; $pattern[] = '/\[b\](.*)\[\/b\]/'; $pattern[] = '/\[i\](.*)\[\/i\]/'; $pattern[] = '/\[u\](.*)\[\/u\]/'; $replacement[] = '<B>${1}</B>'; $replacement[] = '<I>${1}</I>'; $replacement[] = '<U>${1}</U>'; echo preg_replace($pattern, $replacement, $string); ?>
  13. here <?php $string = 'Hello [b] how are you [/b] sorry'; $pattern[] = '/\[b\](.*)\[\/b\]/'; $replacement[] = '<B>${1}</B>'; echo preg_replace($pattern, $replacement, $string); ?> EDIT: this will catch [b] how are you [/b] and replace with <B>(.*)</B> in this case <B>how are you</B> no need to capture the [b]'s by them selfs as your replacing them.. i added an extended one below just for fun i have been playing with RegEx and a may write my own BBCode when time permits sounds like good pratice
  14. i think you mean <?php echo "<a href='http://sometime.com/page.php?eric={$objTask->p['eric']}&cuoos={$objTask->p['cuoos']}&clli={$objTask->p['clli']}' click here </a>" ?> i am assuming its an array so $objTask->p['eric'] and not $objTask->p('eric') page.php echo $_GET['eric']."<br>"; echo $_GET['cuoos']."<br>"; echo $_GET['clli']."<br>";
  15. my fav filter for logins is <?php $string = preg_replace("/[^a-zA-Z0-9]/", "", $string); ?> numbers and letters only
  16. you can create a false mine type and of course changing the extension is easy hence my idea if rebuilding the image.. using the GD library
  17. Hey QBasic was cool
  18. When pulling the data back it will display in unix time format ie 1176857705 so use this <?php $timestamp = row['FieldName']; // <-- pull as normal echo date("m/d/y",$timestamp) ?> Oh better point this out Barand recommand you don't use the 'DEFAULT CURRENT_TIMESTAMP' but instead the following When you add a record put the MySQL value NOW() into that column. personally i havn't had any problems but he highly likly better than me (at PHP & MySQL atleast)
  19. ALTER TABLE `TableName` ADD `FieldName` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
  20. i guess you could read the image dim's and then use imagecreatefromjpeg($filename) and write the output to a file this could cause problems if the file isn't a jpeg
  21. almost any will do, but spam bots also use OCR so maybe a Question test would also help ie What colour is grass green blue red potato
  22. whats the rule ? in other words how do YOU know when to stop ? after the 2nd dot ? also substr works well with strpos
  23. try this SQL statement ALTER TABLE `members_login` CHANGE `register_date` `register_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP basically sets the table to add the current date and time from when the record is created.
  24. Oh another option is to load them into an array and use natsort();
  25. Erm.. ok try <?php $sql = mysql_query("SELECT *, CASE WHEN ASCII(RIGHT(`VTitle`, 1)) > 47 AND ASCII(RIGHT(`VTitle`, 1)) < 58 THEN LPAD(CONCAT(`VTitle`, '-'), 52, '0') ELSE LPAD(`VTitle`, 52, '0') END AS `vsort` FROM videos ORDER BY `vsort`;"); ?>
×
×
  • 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.