-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Need help with displaying reults on same page please?
MadTechie replied to roldahayes's topic in PHP Coding Help
Nope that doesn't help i need the part that has the include statment.. from what i can tell include isn't on that page! -
Just as a note: i did assume you was using DOM, so i second that..
-
The SQL query isn't valid try this to add UPDATE `mklseason5` SET `season_goals` = `season_goals`+1 WHERE `player` = `$player` and this to subtract UPDATE `mklseason5` SET `season_goals` = `season_goals`-1 WHERE `player` = `$player`
-
Need help with displaying reults on same page please?
MadTechie replied to roldahayes's topic in PHP Coding Help
can you post the code from the main page.. or atleast the code around the include "/locator.php"; theirs probably an if block ie if($_POST['search']) { -
[SOLVED] PHP CLI works but web does not for some things
MadTechie replied to kkling's topic in PHP Coding Help
: cool.. A problem always seams easier after you spend some explaining the problem to others.. -
[SOLVED] PHP CLI works but web does not for some things
MadTechie replied to kkling's topic in PHP Coding Help
Humm only think i can think of is compare the info from php -i to <?php phpinfo(); ?> .. either that or maybe permissions or apache! if that doesn't reveal anything then maybe try posting in the PHP Installation & Configuration section, (keep this one open, Just incase) but if you do post their include a link back to here saying you start it here as dup posts are not allowed but in this case i think it will be okay. -
Need help with displaying reults on same page please?
MadTechie replied to roldahayes's topic in PHP Coding Help
Na.. that shouldn't be needed, you just need the include "/locator.php"; on the page where you want the search or the resultes -
[SOLVED] PHP CLI works but web does not for some things
MadTechie replied to kkling's topic in PHP Coding Help
Sorry but i have to ask, is snmpwalk installed and working.. ie have you tried it from terminal ? -
try this (untested) $body = preg_replace( "`([a-zA-Z0-9_.-]+@([a-zA-Z0-9-]+.[a-zA-Z0-9-.]+.[a-zA-Z0-9-.])?)`i", "[email: REMOVED NOT ALLOWED]", $body); OOOPs put the ( in the wrong place
-
yeah.. create a function! <?php function myFunc($start) { foreach ($start as $item) { $item_title = $item->title; $item_link = $item->link; $item_description = $item->description; echo "<h3><a href='$item_link'>$item_title</a></h3> <p>$item_description</p> <p><a href='$item_link'>Continue reading $item_title</a></p>"; } } myFunc($rss_xml->channel->item); myFunc($rss_xml->item); ?>
-
Need help with displaying reults on same page please?
MadTechie replied to roldahayes's topic in PHP Coding Help
try changing print("<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">\n"); to print("<form action=\"\" method=\"post\">\n"); should do the trick, -
[SOLVED] PHP CLI works but web does not for some things
MadTechie replied to kkling's topic in PHP Coding Help
Humm well, shell_exec is disabled when PHP is running in safe mode. so that could be the cause.. infact most Program execution Functions are disabled on shared servers.. check with your host provider or check their not disabled! -
IMHO: As its XML i would use a loop, theirs other ways but your are able to count the nodes, so a foreach seams logical to me!
-
Need help with displaying reults on same page please?
MadTechie replied to roldahayes's topic in PHP Coding Help
Really !!?!! okay try this (kinda need the page with the search form) change <form action="/locator.php" method="post"> to <form action="" method="post"> and add the following code if(isset($_POST['search'])) { include "/locator.php"; }else{ ?> //the html you want to replaced with the found set goes here <?php } -
@umishra, Considering Daniel is very well versed in the formatting of data, might I recommend you Describe the goal, not the step as you may be trying to do something that will never work! What do you have and what do you want at the end.. and how are you trying to get their, From what you have said so far.. its very confusing, why your trying to mix format types!..
-
If you want it for HTML then HTML can handle Hex ie <?php function rgbhex($red, $green, $blue) { return sprintf('#%02X%02X%02X', $red, $green, $blue); } echo rgbhex(15, 15, 15); // prints #0F0F0F ?> if you want to convert decimal to hexadecimal use dechex(10); or hexadecimal to decimal hexdec('a');
-
Calling PHP function on Javascript events e.g onchange
MadTechie replied to rm_phpfreaks's topic in PHP Coding Help
And thanks for shopping at PHPFreaks.com I mean Welcome to PHP Freaks if you need more info about Ajax see the ajax section (note theirs some working examples stickied at the top) -
I assumed his was talking about PHP Application Libraries either way you have both details!
-
Calling PHP function on Javascript events e.g onchange
MadTechie replied to rm_phpfreaks's topic in PHP Coding Help
PHP = server side JS = client side. by the time the JS is ready to run a function php would of finished running.. SO you can't.. you could try ajax that allows you to get results from PHP, so thats probably what your looking for! -
okay lets see if we can clear this thread! #1 your starting question WRONG! it doesn't see all my posts above! Summary (the files will be uploaded from the form and ONLY then php handles it..) #2 you know, use empty($_FILES['myfile']['name']) #3 phpmailer (yes i know it well) sends emails it has nothing todo with uploading files, attachments yes but not uploads #4 Max filesize of an attachment is based on the ISP's limit! not the email build!
-
class = classes (OOP) lib = Library (bunch of simpler functions) a lib maybe a set of common functions like a simple function to check if an email is a valid format, think of a lib as common everyday helper functions, of course these can contain classes as well! but if it gets too complex i normally give it its own files and class a class is used for OOP (handling of objects)
-
Well technically its not a table is multiple tables, One for each item by the looks of things! I'm sorry but you need to sort out the whole page! your clearly over using tables (in the wrong way) <table width="95%" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td> <table border="0" cellpadding="1" cellspacing="0" align="center" class="paging-content"> <tr> <td align="right">Found <b>8</b> records</td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="1" cellspacing="0" align="center" class="paging-content"> <tr> <td align="center" class="paging-letters">/...snip.../ </td> </tr> </table> </td> </tr> </table> <a name=13402></a> <table align="center" border="0" cellpadding="5" cellspacing="0" class="table-view-summary"> <tr> <td colspan="2"> <h1 class="font-bold-view"> <a href="http://www.legalexpertsearch.com/listingdetail.php?id=13402">Phillips & Associates</a> </h1> </td> </tr> <tr> Also this is a HTML/CSS problem not a PHP one EDIT: also if its really important then try the freelancers section!
-
Well Str_replace or RegEx either way you need to know the UserNames ie $data = preg_replace('/(Blade280891|MadTechie)/i', '<a href=\'user.php?name=\1>\1</a>', $data); your need someway to identify its a username!
-
str replace works well with exact replacement but RegEx is more flexable,, the problem is the lack on info.. you say you want to replace username with a hyperlink.. so i assume you have text with a bunch of info and some words are usernames and those you wish to create hyperlinks for.. if this is the case then your need to build an array of usernames at the same time build the hyperlinks for those users ie $Users = array("Blade280891", "MadTechie"); $UsersLink = array("<a href='user.php?name=Blade280891>Blade280891</a>", "<a href='user.php?name=MadTechie>MadTechie</a>"); then use $data = str_replace($Users, $UsersLink, $data); Now you could create a regEx with a callback etc etc but i think that maybe slower, you could extract every word and remove dups then check in the userlist.. that may work but its a bit of a 50/50 game it really depends on quite a few things my Solution about is based on alot of guess work!