RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
Need Help with Image Uploads and Watermarks
RussellReal replied to irishpeck's topic in PHP Coding Help
click the link that the function name is, it will take you to php.net and they explain all the parameters -
sure why not? just make sure you make the session expire in like 25 minutes lol
-
[SOLVED] Simple Question about converting phone numbers...
RussellReal replied to iPixel's topic in PHP Coding Help
<?php $number = '9998887777'; echo '('.substr($number,0,3).') '.substr($number,3,3).' - '.substr($number,6,4); ?> -
if you'd like to hire me to do it for you, that'd be good for me, however, if you want to do it yourself.. You could just put an htaccess file in your main directory like: mydomain.com/ and in there the .htaccess file THEN inside that you do RewriteEngine On RewriteCond %{REQUEST_URI} !-d RewriteCond %{REQUEST_URI} !-f RewriteRule ^(.*)$ user_index.php?query=$1 and then in the PHP to actually parse the string as it could be you use $_SERVER['QUERY_STRING'] and then you get after the 'query=' and then seperate by '=' and then parse them into your own GET array, I think $_POST should still be sent or carried over by the rewrite.. and then in user_index.php you handle all the data, and it WILL simulate the look and feel of your already existing system, except instead of hundreds of folders, you'll just have 1 file accessing 1 folder, or no folders, depending on how you code it
-
Need Help with Image Uploads and Watermarks
RussellReal replied to irishpeck's topic in PHP Coding Help
imagecopymerge -
as PFM says, all data is destroyed when the script exits, minus sessions, they are stored in a file somewhere on teh computer with the unique session ID for that session. Variables arn't exactly 'floating' around, they're exactly where you need them, there are two main reasons you'd unset a variable, 1) You have an if statement which checks for 'isset($whatever)' and you could have a certain procedure to check whether or not to actually unset $whatever or not due to other factors, but that is bad practice, you should use booleans for that. 2) You are handling alot of data, and to avoid your script producing an error and dying, you should free up memory as you progress in the script
-
I could do it for $30
-
sorry for double post.. if you want to add me to MSN add me, I hafta sleep. sorry RussellonMSN@hotmail.com
-
I'm not sure you're pulling the data correctly, I did a quick check and 'mysqli_query' doesn't exist
-
<?php $miles = ($gallons = array()); while ($r = mysql_fetch_assoc()) { $miles[] = $r['mileagle']; $gallons[] = $r['gallons']; } $mileGauge = array_pop($miles) - $miles[0]; array_shift($gallons); $tg = 0; foreach ($gallons as $v) { $tg += $v; } $mpg = $mileGauge / $tg; ?>
-
ok so from 100003 to 100050 you used 14.26 gallons of gas, is what thats saying?
-
first question, is mileage only increasing? or could some be like 95 100 92 85 and does gallons represent the gallons left in the tank, or the gallons used?
-
in UPDATE, the syntax is UPDATE `tableName` SET `fieldName` = 'value' WHERE `fieldX` = 'anotherValue' and to select in order of importance, higher importance would be @ top SELECT * FROM `tableName` WHERE `x` = 'x' ORDER BY `importance` DESC
-
just use str replace foreach ($row as $k => $v) { str_replace('{'.$k.'}',$v,$data); } if you want to add those 'flags' in you might want to use substr and strpos to look for { and then get the rest to } remove the { } in the variable and then explode by | and then loop thru the parameters, or just pass it to a function which expects the parameters ion the order they were expecting them, either way its doable.
-
Non-escaped data breaks input tag value attribute
RussellReal replied to grahamsimmons's topic in PHP Coding Help
when you submit that form, it WILL still be sent as & < etc... So when you receive the data, apply html_entity_decode() to it to make it plain text again without all the html specific entities -
-> is to go inward into an object <?php class Frog { public $name: public function Frog($name) { $this->name = $name; } public function talk() { echo $this->name.' Says: Ribbit<br />'; } } $rudie = new Frog('Rudie'); $rudie->talk(); ?> $rudie is an instance of the Frog class... -> tells it to go inside $rudie(Frog) and use the function talk() which would echo Rudie Says: Ribbit<br /> to reference a element inside an associative array you use the same brackets you use on a numbered array $arrayVar['nameOfElement'] and for numbered it would be: $arrayVar[10] for the 11th Element
-
Two different sites (network) that I want to use same tables
RussellReal replied to scrubbicus's topic in PHP Coding Help
uhm, any SHARED data, should go into a shared database, and any website-specific data should go in its own database. -
they don't use SMTP for their inboxes, they use sql and count the results I'm not exactly sure how to work with emails with php, coz I havn't had any need to, however, this function looks promising imap_num_msg
-
Two different sites (network) that I want to use same tables
RussellReal replied to scrubbicus's topic in PHP Coding Help
if you're on shared hosting, alot of the time they disallow remote connections.. if you make 12 sites, host them all on the same hosting package.. then it should work with no problem. If you are on a shared network and you absolutely MUST put each website on another hosting, than you might experience some problems. anything other than shared I think allows remote connections -
what're you tryna do..? it could be you didn't uncomment the gd package in your php ini.. it usually comes quoted out in php downloads
-
that looks like it should work =\, are you CALLING the function?
-
anytime bro, click 'solved' please
-
no... you'd want a table like this: comment_id |comment_by_id |comment_to_video_id |comment |comment_rating_up |comment_rating_down
-
when login.php 'okay's the credentials, you should set a session 'logged_in' or a cookie, and then in all the members' areas, check if ($_SESSION['logged_in']) { }
-
haha, I'll do it for $25, send me an email if interested: RussellonMSN@hotmail.com