anupamsaha
Members-
Posts
251 -
Joined
-
Last visited
Never
Everything posted by anupamsaha
-
Change: <form> To: <form method="post" action="resersend.php">
-
Open an external url without displaying it to the user? :)
anupamsaha replied to svenn's topic in PHP Coding Help
Look into cURL (http://php.net/manual/en/book.curl.php) -
Try this: <?php $a = 350000; $b = 360000000; $hmm = $a / $b; echo sprintf("%f", $hmm);
-
html form can i action two php scripts at the same time?
anupamsaha replied to Orionsbelter's topic in Applications
It is possible to trigger two PHP scripts from one form, even from one click event. I have done this for click tracking for a site. This can be done through JavaScript, specifically jQuery AJAX. -
Read more... if text more than 600 characters
anupamsaha replied to NealeWeb's topic in PHP Coding Help
No worries. Here you go: echo '<div align="center"> <table border="0" cellpadding="10" cellspacing="0" width="969" background="imgs/reviewbox.png" height="157"> <tr> <td height="19" ><span class="font1">' . $jtitle . '</span></td> <td height="19" > <p align="right"><a href="review.php?review_id=' . $revid . '"><span class="font">View Full review</span></a></td> </tr> <tr> <td valign="top" colspan="2"><span class="font">' . substr($t,0, . ((strlen($t) > ? ' <a href="yourlink">Read more...</a>' : '') . '</span></td> </tr> </table> </div>'; If you are trying to take a variable, do this: <?php $t = "Your text"; $y = substr($t,0, . ((strlen($t) > ? ' <a href="yourlink">Read more...</a>' : ''); // see that I have enclosed the conditional statement in braces. echo $y; ?> -
stristr dosn't get external sites as string for me S:
anupamsaha replied to sandrodz's topic in PHP Coding Help
So, is the issue with "stristr" or with "file_get_contents"? The error that you are seeing that is due to a setting of allow_fopen_url is turned off in you php.ini file and that is good for security reason. Still, if you want to open an remote URL through PHP, use cURL instead. -
http://www.plupload.com is really promising. Go ahead and use it. Let us know how it works.
-
File chuck should be done in the client side before it goes to server. So, PHP might not be an ideal solution for this.
-
Read more... if text more than 600 characters
anupamsaha replied to NealeWeb's topic in PHP Coding Help
Please mark the topic as "resolved" if you are satisfied with the help. -
@nivong: I see that you are writing Joomla code but not obeying the rule of Joomla. Writing JS like this will break the W3C validation for the page. Please see http://docs.joomla.org/Adding_JavaScript_and_CSS_to_the_page and stick to the standards of Joomla. You will stand apart from the others. Thanks!
-
Use if(isset()).
-
Wordpress Multisite: Adding / Removing 'www' in site location
anupamsaha replied to pealo86's topic in Applications
Your Wordpress installation should have a .htaccess file in the root. Please connect through FTP and download the file. Usually FTP clients will not list the file starting with a dot(.). Please find out how to list the hidden file in your FTP client. Then you should see this file in the list. Open it with "Notepad" or in any simple text editor (NOT IN MS-WORD) and add the following line after the line "RewriteEngine On": # redirect non-www to www RewriteCond %{HTTP_HOST} ^domain\.co\.uk RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [R=301,L] Save and reupload the file back to the location from where you have download it. Please take a backup of the previous .htaccess file before downloading. Just in case. -
<?php $results = mysql_query("SELECT COUNT(*) AS totalCount FROM table"); $values = mysql_fetch_assoc($results); echo $values['totalCount']; ?>
-
Read more... if text more than 600 characters
anupamsaha replied to NealeWeb's topic in PHP Coding Help
The theory would be like this: <?php $t = "Your text goes here Your text goes here Your text goes here Your text goes here Your text goes here Your text goes here Your text goes here Your text goes here Your text goes here"; echo substr($t,0,10), (strlen($t) > 10) ? ' <a href="yourlink">more...</a>' : ''; // taken 10 as limit. you can use 600 here or make it a variable. ?> -
stristr dosn't get external sites as string for me S:
anupamsaha replied to sandrodz's topic in PHP Coding Help
It works for me. What you want to do? -
Put the following at the top of the code and let me know what you see in the output: error_reporting(E_ALL); ini_set('display_errors', 1);
-
$date1 = strtotime('-1 month');
-
Will serialize() and unserialize() help you? http://php.net/manual/en/function.serialize.php http://php.net/manual/en/function.unserialize.php
-
Then take the JavaScript path to mask them before you upload them.
-
Try $data = mysql_query("SELECT * FROM users WHERE users.bizname LIKE '%$bizname%' ");
-
I didn't test the following, but it should be something like this: // FLOOR(1 + (RAND() * MAX(id)) is to randomly choose an 'id' from 1 (lowest) to MAX(id) (highest available) $getleftads = "SELECT * FROM `left_advert_banners` WHERE `id` = (SELECT FLOOR( 1 + ( RAND( ) * MAX( `id` ) ) ) ) ORDER BY id DESC LIMIT 1
-
Hi all, I want to develop a Apache/PHP/MySQL based solution that will control the internet access from client PCs or Laptops. What I want to do here is to install the application only in a server where the internet is provided to the subscribers. Also, I would not install any client software at the subscribers' end. Subscribers will have a login screen while trying to access the internet and after a successful login (username/password), they should be able to access the internet. Can anyone put some light towards how to proceed about it? Thanks!
-
I would suggest you to check couple of things. 1. If $config['asf_root'] has a training slash (/)? 2. If forum_functions.php has the read permission?