Forum: PHP Jan 8th, 2008 |
| Replies: 2 Views: 664 What makes you have $arrayimploded as "[0]"? Why not just 0 and use the function properly:
array_splice($arr[$arrayimploded], end($index), 1, $data);
If you can avoid eval(), avoid it. |
Forum: Geeks' Lounge Jan 8th, 2008 |
| Replies: 30 Views: 3,169 The stork story just keeps me amazed. They shy away from human biology, yet they feel absolutely comfortable with telling animal abuse stories to their children. Keep your dirty fantasies to... |
Forum: IT Professionals' Lounge Nov 1st, 2007 |
| Replies: 4 Views: 806 Try disabling and enabling again the connection (Control Panel -> Network and Internet -> Network Sharing Center -> Manage Connections, select your connection and disable it, then enable again). That... |
Forum: PHP Nov 1st, 2007 |
| Replies: 2 Views: 617 Actually it's the slash that causes trouble:
$info = ($info2['dirname'] == '\\') ? "" : $info2['dirname'];
$basedir = ($basedir == '\\') ? '' : $basedir; |
Forum: PHP Nov 1st, 2007 |
| Replies: 11 Views: 2,769 You've misplaced $item and $price definitions. $i that is used is not defined yet. Try rearranging things:
// Check if button name "Submit" is active, do this
if($Update){... |
Forum: PHP Nov 1st, 2007 |
| Replies: 4 Views: 1,652 I bet it does and thanks for sharing. I've just dropped in another hint in case it doesn't work for someone. |
Forum: PHP Nov 1st, 2007 |
| Replies: 5 Views: 1,215 Make sure you include it before you're trying to act on db and make sure you're using the correct path. The best idea is to use an absolute path (also see $_SERVER['DOCUMENT_ROOT']) |
Forum: *nix Software Nov 1st, 2007 |
| Replies: 3 Views: 1,427 The best idea is not to use .*
RewriteRule ^insurance/metatags-cat_id-([0-9]+)\.htm$ insurance/metatags.php?cat_id=$1 |
Forum: PHP Nov 1st, 2007 |
| Replies: 3 Views: 821 Try setting an absolute path to extension_dir |
Forum: PHP Nov 1st, 2007 |
| Replies: 4 Views: 1,652 Wouldn't it be a better idea to use utf8? |
Forum: PHP Nov 1st, 2007 |
| Replies: 8 Views: 4,448 >$mydate is just a date in the form 0000-00-00 pulled from somewhere else in my database. But it keeps spitting out "Resource id #8."
That means $mydate is not what you expect. It's probably the... |
Forum: PHP Jul 1st, 2007 |
| Replies: 1 Views: 4,569 $_SERVER['DOCUMENT_ROOT'] is not defined in IIS, check this user comment on PHP Manual: http://www.php.net/manual/en/reserved.variables.php#59409 |
Forum: PHP Mar 22nd, 2007 |
| Replies: 2 Views: 5,810 You can save the randomly selected id to the session. That way you can keep track of the questions that have been selected, select only questions that have not yet been selected and navigate through... |
Forum: PHP Mar 22nd, 2007 |
| Replies: 5 Views: 2,154 On log in success you redirect to $session->referrer, which unlikely is the success page. Change it to the url of your success page. |
Forum: PHP Mar 13th, 2007 |
| Replies: 4 Views: 1,209 Check the permissions; if you have the read permissions on the source file and write permissions on the destination directory. |
Forum: PHP Feb 10th, 2007 |
| Replies: 1 Views: 1,826 |
Forum: PHP Feb 8th, 2007 |
| Replies: 7 Views: 6,405 No, if you check the default setting for session.cookie_lifetime, it's 0. |
Forum: PHP Feb 8th, 2007 |
| Replies: 7 Views: 6,405 There are two session types: persistent and simple sessions.
The persistent sessions are established by setting a session cookie lifespan for a specific period (for example a month). In this case,... |
Forum: PHP Feb 7th, 2007 |
| Replies: 7 Views: 6,405 No, that's not the case. The session id is saved in a cookie, which is browser specific. Thus opening a new browser starts another session.
The workaround would be saving the session id in a... |
Forum: PHP Feb 7th, 2007 |
| Replies: 3 Views: 968 chdir("path/to/directory");
$files=glob("*");
foreach ($files as $file){
$result=mysql_query("select * from files where file_name='".mysql_real_escape_string($file)."'");
... |
Forum: PHP Feb 7th, 2007 |
| Replies: 2 Views: 1,618 The trick is to set the upload path from as $_POST['path'] instead of a fixed one:
$replace=array("../","./",";");
$path=str_replace($replace,"",$_POST['path']);
... |
Forum: Posting Games Feb 2nd, 2007 |
| Replies: 7,595 Views: 661,922 |
Forum: PHP Feb 2nd, 2007 |
| Replies: 1 Views: 1,197 You have echo "t"; which causes header() not to work, thus no redirect occurs (plus warning should be issued, you'd see it if you had error reporting on).
Also, are you trying to pass... |
Forum: PHP Feb 2nd, 2007 |
| Replies: 2 Views: 1,480 You may also wanna check out: http://www.php.net/manual/en/function.number-format.php |
Forum: PHP Feb 2nd, 2007 |
| Replies: 11 Views: 3,315 Actually file uploads is a built-in php feature and no additional extensions are required. At least there's no mentioning of special requirements in php manual. |
Forum: Posting Games Feb 1st, 2007 |
| Replies: 7,595 Views: 661,922 |
Forum: PHP Feb 1st, 2007 |
| Replies: 11 Views: 3,315 It seems strange that is_uploaded_file changes anything, it only tells whether the file was uploaded. I'll keep that in mind for future reference. Glad you worked it out. :) |
Forum: PHP Jan 30th, 2007 |
| Replies: 11 Views: 3,315 What php version do you have installed? |
Forum: PHP Jan 30th, 2007 |
| Replies: 11 Views: 3,315 Really seems to be the permissions. There should be a user for php (it's not named php) but php runs under some user name (sorry for not being specific, I'm not a *nix guru).
Well, if you can't... |
Forum: Posting Games Jan 30th, 2007 |
| Replies: 7,595 Views: 661,922 |
Forum: PHP Jan 30th, 2007 |
| Replies: 11 Views: 3,315 The owner of the directory should be php, not apache.
Also:
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "File". basename($_FILES['uploadedfile']
... |
Forum: PHP Jan 30th, 2007 |
| Replies: 2 Views: 2,170 Since the unchecked checkboxes are not submitted to php, you loose the index of the selected row. So for example if you select a single row, the index will always be 0, no matter which row is that.
... |
Forum: PHP Jan 30th, 2007 |
| Replies: 7 Views: 2,207 Why do you have it in the loop along with the display of the images? You increase the $link_id on every iteration, that makes no sense at all. $link_id is supposed to be taken from the url and the... |
Forum: PHP Jan 29th, 2007 |
| Replies: 7 Views: 2,207 Can you show the part where you increase the views? |
Forum: Posting Games Jan 29th, 2007 |
| Replies: 7,595 Views: 661,922 |
Forum: PHP Jan 28th, 2007 |
| Replies: 8 Views: 12,426 if(mysql_num_rows($result)==0){
//do this
} |
Forum: PHP Jan 28th, 2007 |
| Replies: 7 Views: 2,207 Here's the idea:
$id=(int)$_GET['id'];
mysql_query("UPDATE walls SET wall_views=wall_views+1 WHERE id=$id"); |
Forum: Posting Games Jan 28th, 2007 |
| Replies: 7,595 Views: 661,922 |
Forum: PHP Jan 28th, 2007 |
| Replies: 3 Views: 1,838 You've got a syntax error there.
if (empty($_POST['question1'])) {
die(" Please Select an option.");
}
else{
//.....process the form
} |
Forum: Posting Games Jan 26th, 2007 |
| Replies: 7,595 Views: 661,922 |