-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Whiles only taking queries with one result?
MadTechie replied to rockinaway's topic in PHP Coding Help
Sorry i am having trouble reading the code you supplied.. can you please repost it -
Cannot modify header information - headers already sent by
MadTechie replied to suttercain's topic in PHP Coding Help
looking at the error do you want to post the code for get_connected.php then ? -
try echo defined('POWER_WHEELS_INFO'); also require 'includes/const_phrases.php';
-
oop: PHP4 manual | PHP5 manual | spl | class index | wiki | history | tut | tut | tut | pdf or HERE
-
Am i the only one still lost here!! PS you should also use the code tags new question why don't use use mail();
-
<?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 ?>
-
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'); ?>')"> ?>
-
may wanna double check that, can you post your code
-
what about changing sendpageadvisory.php to <?php echo "sendpageadvisory.php?eric=".$objTask->p('eric') ?>
-
isn't that the same as unix timestamps? ie using DEFAULT CURRENT_TIMESTAMP from MySQL ?
-
please click solved
-
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); ?>
-
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
-
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>";
-
password protect with (or without) sessions?
MadTechie replied to HaLo2FrEeEk's topic in PHP Coding Help
my fav filter for logins is <?php $string = preg_replace("/[^a-zA-Z0-9]/", "", $string); ?> numbers and letters only -
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
-
Hey QBasic was cool
-
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)
-
ALTER TABLE `TableName` ADD `FieldName` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
-
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
-
script to generate randome image before form submit
MadTechie replied to isaac_cm's topic in PHP Coding Help
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 -
Trying to set a delimiter with substr. Possible?
MadTechie replied to suttercain's topic in PHP Coding Help
whats the rule ? in other words how do YOU know when to stop ? after the 2nd dot ? also substr works well with strpos -
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.
-
[SOLVED] ORDER BY name ASC - but 10 is before 1 (please help)
MadTechie replied to helpmeplease2's topic in MySQL Help
Oh another option is to load them into an array and use natsort(); -
[SOLVED] ORDER BY name ASC - but 10 is before 1 (please help)
MadTechie replied to helpmeplease2's topic in MySQL Help
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`;"); ?>