-
Posts
1,216 -
Joined
-
Last visited
Everything posted by WebStyles
-
http://pt2.php.net/manual/en/function.date.php
-
since the folder is called 'includes' I'm assuming the files in there are always pulled out by another file in the root directory and never actually executed from there they reside. you can simply use include('includes/test2.php'); in test.php
-
1. a little timestamp next to the messages would be nice. 2. the 'edit profile' popup window is a bit too small for the contents (I'm using Firefox 4+ on Mac Os X) 3. resizing the browser stretches the side area and not the text area. 4. in 'settings', when I change the option to show avatars to YES, chat window jumps to the top instead of staying at the bottom. Also, the settings layer could close automatically when we click on 'save' since there are so few options in there. the extra click seems pointless. 5. it's a bit annoying that some popups are css and others are new browser windows. 6. the text input area (at the bottom) could be the same width as the main text area, just to keep things nice and aligned. 7. I clicked on 'lobby' and suddenly I found myself talking to myself, with no way to go back into the main chat room. LOST. hope this helps
-
Romku - Collaborative Website that references Software
WebStyles replied to pmorel's topic in Website Critique
Not really, I'm a mac user, and have been using VersionTracker for years. Wouldn't change it for anything. Design is nice and simply though, I like that. the 'Filter by OS' box is very annoying because it changes the order of the elements. Did a simple search for 'photoshop' and the first results are all filters... if someone searches for an application name I think it would make more sense to return the applications first. I also don't like the fact that the search box jumps from one place to another. Speed is good, Icons have nice quality. Nothing to point out in the design, my issues are more about usability. The compare feature works with only 1 selected item? that's a bit strange. I would also link the operating systems (on the top right of each result) directly to the developers websites, instead of having to click first on the details. Hope this helps, -
need a search engine that will search my php files
WebStyles replied to brunobliss's topic in PHP Coding Help
Sorry about that. Thanks for fixing it. -
need a search engine that will search my php files
WebStyles replied to brunobliss's topic in PHP Coding Help
I also don't really get exactly what you want, but.... while you're at it, you can also simplify this: <td align="center"><font face="Calibri"><a href="abc.php">A-B-C</a></font></td> <td align="center"><font face="Calibri"><a href="def.php">D-E-F</a></font></td> <td align="center"><font face="Calibri"><a href="ghi.php">G-H-I</a></font></td> <td align="center"><font face="Calibri"><a href="jkl.php">J-K-L</a></font></td> <td align="center"><font face="Calibri"><a href="mno.php">M-N-O</a></font></td> <td align="center"><font face="Calibri"><a href="pqr.php">P-Q-R</a></font></td> <td align="center"><font face="Calibri"><a href="stu.php">S-T-U</a></font></td> <td align="center"><font face="Calibri"><a href="vwx.php">V-W-X</a></font></td> <td align="center"><font face="Calibri"><a href="yz0.php">Y-Z-0</a></font></td> into something like this: <?php $buttons = array("A-B-C","D-E-F","G-H-I","J-K-L","M-N-O","P-Q-R","S-T-U","V-W-X","Y-Z-0"); foreach($buttons as $b){ echo '<td align="center"><font face="Calibri"><a href="'.strtolower(str_replace("-","",$b)).'.php">'.$b.'</a></font></td>'; } ?> then, if what you want to search is a specific letter and load the correct page, all you need to do is search the array values for the letter you want, something like: (searching for letter F as an example) <?php $find = 'F'; foreach ($buttons as $b){ if(strpos($b,$find)) echo 'Found '.$find.' IN PAGE '.strtolower(str_replace("-","",$b)).'.php'; } ?> MOD EDIT: code tags added. -
Not sure what you want, but sounds like you want to pull out random values from an array but never repeat them? try: array_splice ( $Variable , $key , 1); this will basically return the value at $variable[$key] and remove it from the array (so it can not repeat). Hope this helps
-
see also file_put_contents();
-
just read the manual, you can add emails by separating them with commas. But you'll probably be giving away all the addresses to each user. test and see. Or just create a loop. http://pt.php.net/manual/en/function.mail.php
-
I'm not sure if you can pass an array with emails to the mail function, but you can always loop it.
-
lol. don't know how I missed that one.
-
try this: $message = "Dear client,\n your access details are:\n Usr Name:".$email."\n Password:".$password;
-
just place another page in between. (I'll call it jump.php just for this example) every time you hit the 'random' button, send people to jump.php, that reads database, extracts random movie id and then redirects to movie.php?mid=xxxx in movie.php you use the $_GET['mid'] value to display the actual movie. this way every movie shown has a different url that can be bookmarked or sent to friends via email. hope this helps.
-
Stable way to execute some code only at the start of the program
WebStyles replied to wepnop's topic in PHP Coding Help
Cool. Glad to have helped. Please mark this post as 'resolved'. -
so basically all you need is to store the correct exchange rate somewhere you can update it from time to time, and just use that to convert the value to euros. At this moment, 1 gbp = 1.126 Euros. Just multiply gpd by the rate to get value in euros.
-
querying bookings/events that are in a given month
WebStyles replied to dadamssg87's topic in MySQL Help
try something like this: (I'm assuming your database fields are in the date format YYYY-MM-DD) $yesterday = date("Y-m-d",strtotime("- 1 day"); $query = "select * from `Bookings` where (`startDate` BETWEEN '$first' AND '$last') and (`endDate` > '$yesterday') "; // also assuming you do not want to grab expired records, thats why I added condition that end date should be greater than yesterday. hope this helps -
cant assign time to a session variable using date()??
WebStyles replied to spryce's topic in PHP Coding Help
have you echoed $_SESSION['time'] to see what's being assigned to it? try: $_SESSION['time'] = date("h:i a"); // difference are the double quotes and removed the : that seperated am/pm from the time, just 'cause it seemed weird. hope this helps -
the date functions is quite smart, you can use stuff like: $date = date('Y-m-d',strtotime('- 1 month')); hope this helps
-
I agree with revraz. Use salt. This basically means that you add your own distinct hash to the password before you hash it again. something like this: $salt = md5('My_L1ttl3#S4lt'); $encrypted = sha1($salt.$password); you can play around with it, use both methods like example (sha1 & md5) or just one, add salt to beginning, end, middles, whatever. hope this helps
-
values inside quotes ("...") are treated as strings. $a = 57; is a number. $a = "57"; is a string. you can use functions like is_int, intval, etc... to figure out if variables are numbers or strings. what's also happening with your code is that you're echoing $a and $c right after each other with no space or line break. try this to separate them on different lines: echo '<br>A = '.$a; echo '<br>C = '.$c; hope this helps
-
Not sure if this is what you want, but check out the glob flags: GLOB_NOSORT - Return files as they appear in the directory (unsorted) hope this helps
-
yes, that's sort of what I was suggesting: you calcuate your gbp price with your formula, (this remains unaltered) but at the moment of displaying it, you make an api call to google, send over your price and google will return the same price in euros. then you can display both. of course this depends on what you're displaying... if it's a very long page with hundreds of prices, then api calls don't make sense because they would take too long.
-
Stable way to execute some code only at the start of the program
WebStyles replied to wepnop's topic in PHP Coding Help
I'm not really sure what you want. From what I understand, you have a set of functions you want to run only once. Why don't you use a session var to control if it has been run or not? something like: $_SESSION['initial_setup'] = 'done'; and only execute the code if (!isset($_SESSION['initial_setup']) || $_SESSION['initial_setup'] != 'done') { ..} again, I'm not sure if this is what you intended. hope it helps. -
I'm guessing what you want is a currency converter that is always updated with the latest rates. try something like this: http://www.dynamicguru.com/php/currency-conversion-using-php-and-google-calculator-api/
-
told you your script is badly written because it does not distinguish between what's a password error or what's a username error. Glad you finally solved it.