Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
Store the answers in a session variable, a cookie, or pass them using serialized arrays in hidden form fields.
-
I always have javascript turned on.
-
Hell no. Frontpage sucks.
-
[quote author=Koobi link=topic=103263.msg411402#msg411402 date=1154988507] [quote author=alecjw link=topic=103263.msg411319#msg411319 date=1154971126] With ubuntu, you don't have to download the .deb packages, they come on a CD. Also, updating it is ubeleivably easy, just: [code]aptitude upadate[/code] and everything will be updated off of the internet. [/quote] actually its: [code] sudo apt-get update [/code] that will only update your list of repositories this will actually upgrade your packages: [code] sudo apt-get upgrade [/code] [/quote] If runs as root he don't have to prepend sudo. And he can use aptitude instead of apt-get.
-
This is what it looks like to me: [URL=http://img53.imageshack.us/my.php?image=screenshot6bn0.png][IMG]http://img53.imageshack.us/img53/8561/screenshot6bn0.th.png[/img][/URL]
-
[code]<?php $code = "NG56QN"; $length = strlen($code); for($i=0; $i <= $length; $i++) { if(preg_match("/[0-9]{1,1}/",substr($code,$i,1))) { $split = $i+1; break; } } if(!empty($split)) { echo substr($code,0,$split)."-".substr($code,$split,1); } else { echo $code; } ?>[/code] This should do it if I understood it correctly.
-
[quote author=shocker-z link=topic=104341.msg416125#msg416125 date=1155645845] Hi there i was just wondering if anyone has come up with a function or able to come up with a function that will change a postcode to the following format.. NG56QN will become NG5-6 N18HV will become N1-8 NE15ES will become NE1-5 M225EX will become M22-5 Is this possible? as there are a few formats that it can be.. Regex is not my strong side but i can only see this as being the answer :) Regards Liam [/quote] I don't see any logic in how the - is placed, so how should PHP automaticly be able to "figure" it out?
-
You can however not just put it in a folder and access it by typing it's url.
-
1. No marquees 2. No using images to show text. It's slower, and people with text readers won't be able to view your site.
-
Take a look at this: http://php.net/imagecreatefromstring
-
[quote author=RockingGroudon link=topic=104173.msg415398#msg415398 date=1155559225] Its not a text box, and I only wanted to chang my Display Name [/quote] That's because it's disabled.
-
In FireFox: View -> Character Encoding -> More Encodings -> SE & SW Asian -> Georgian (GEOSTD8) I don't know about IE.
-
I'm not sure it's supposed to work on directory names.
-
Do you mean in your script? If so then put this line before you output anything (or use output control): [code]header("Content-type: text/html; charset=utf-8");[/code]
-
I usually do something similar to Koobi. I just have a file with an array like this: en.php [code]<?php $lang['welcome'] = "Welcome, %s!"; $lang['something'] = "Something"; ?>[/code] And then I include it.
-
Try to put [code] or die(mysql_error())[/code] after the connect function and see if an error is returned. Another problem might be that you ran it from command line first, that created the table, then tried on the server, but then it can't create it because it already exists.
-
Is this what you're looking for: [code]<?php $time = '13:15:07'; echo "Time: {$time}<br />"; $new_time = date('H:i:s',strtotime($time)+8); // adds 8 seconds echo "New time: {$new_time}"; ?>[/code] It would generate the output: [code]Time: 13:15:07 New time: 13:15:15[/code]
-
Try change this line: [code]$sql = mysql_query("SELECT * FROM news WHERE news_old='n' ORDER BY id DESC");[/code] to [code]$sql = mysql_query("SELECT * FROM news WHERE news_old='n' ORDER BY id DESC") or die(mysql_error());[/code] and tell me if it returns an error.
-
[code]SELECT count(*) FROM bla bla bla rest of query[/code]
-
You could have a field in your session table that's called last_click and every time they go to another page it will be updated like this: [code]mysql_query("UPDATE sessions SET last_click='".time()."' WHERE id='{$_SESSION['id']}' LIMIT 1");[/code] Then you could check like this if they have been inactive for a long time: [code]$query = mysql_query("SELECT * FROM sessions WHERE id='{$_SESSION['id']}'"); $data = mysql_fetch_assoc($query); if($data['last_click']+(60*30) < time()) { mysql_query("DELETE FROM sessions WHERE id='{$_SESSION['id']}'"); unset($_SESSION['id']); } else { // they are still logged in }[/code]
-
Do something like [code]<?php // ... other stuff $query = mysql_query("SELECT * FROM sessions WHERE username='{$username}'"); if(mysql_num_rows($query) <= 0) { do_login(); } else { echo "Sorry, you are already logged in"; } // ... other stuff ?>[/code]
-
First of all I think there should be a margin between the left side and the content. Then there is the navigation bar at the top. It looks strange, it looks like there should be something above it, like the tabs in SMF and then the navigation should, unlike the content, have no margin to it's left side. The search/login box is far too to the right side. Also when hovering over the register button, the background becomes white and I think you should either use buttons OR images, not a combination. The form fields are also too wide. Check the screenshot. [attachment deleted by admin]
-
Instead of [code]<input type="image" src="images/submit.gif" value="Submit" name="submit" title="Submit"/>[/code] I think you should use this: [code]<button type='submit' name='submit'><img src='images/submit.gif' alt='submit' /></button>[/code] That will make it an actual submit button.
-
[code]<?php include_once "myconnect.php"; $query=mysql_query('SELECT * FROM workorder WHERE Work={$Contact}')or die(mysql_error()) ; ?>[/code] Try that. Instead of all those field names I used an * meaning all fields.
-
Well, there is no difference in how the command is executed, the only difference is the output/returning.