Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 443
Search took 1.33 seconds.
Search: Posts Made By: devinemke
Forum: Apache configuration 06-18-2012, 06:28 PM
Replies: 0
Views: 769
Posted By devinemke
Apache IfDefine conditionals in .htaccess

my dev setup: Mac OSX 10.7.4 / Apache 2.2.21 / PHP 5.3.10

i wish to add conditional logic to my .htaccess files depending on dev vs live environment. for example i want to have authentication on...
Forum: PHP 10-14-2009, 08:09 PM
Replies: 5
Views: 1,308
Posted By devinemke
<?php ob_start(); ?> HTML code here ...

<?php
ob_start();
?>

HTML code here

roomicon.gif

roomicon.gif
Forum: PHP 08-07-2009, 08:23 PM
Replies: 9
Views: 697
Posted By devinemke
again, roll all of your database queries into a...

again, roll all of your database queries into a single function (like i showed you with the db connection routine)
Forum: PHP 08-07-2009, 08:13 PM
Replies: 2
Views: 2,147
Posted By devinemke
couple suggestions: 1. dump the $errflag...

couple suggestions:

1. dump the $errflag variable. you don't need it. you have already got an array full of errors so you don't need an additional boolean to know if there are errors.

2. you...
Forum: PHP 08-07-2009, 08:01 PM
Replies: 9
Views: 697
Posted By devinemke
db_connect.php <?php function...

db_connect.php

<?php
function db_connect($host, $username, $password, $dbname)
{
mysql_connect($host, $username, $password) or exit(mysql_error());
mysql_select_db($dbname) or...
Forum: PHP 08-07-2009, 07:41 PM
Replies: 9
Views: 697
Posted By devinemke
then just build a function that takes the...

then just build a function that takes the database connection info as it's arguments and include that function script where needed
Forum: PHP 08-07-2009, 07:34 PM
Replies: 9
Views: 697
Posted By devinemke
i don't understand the question. why don't you...

i don't understand the question. why don't you simply include (http://www.php.net/include) the database connection file in any script that needs it?
Forum: PHP 08-06-2009, 08:31 PM
Replies: 1
Views: 379
Posted By devinemke
$string = 'dev.domain.com'; $explode =...

$string = 'dev.domain.com';
$explode = explode('.', $string);
array_shift($explode);
echo implode('.', $explode);
Forum: PHP 06-23-2009, 06:46 PM
Replies: 6
Views: 936
Posted By devinemke
you should (if you have not already) use a...

you should (if you have not already) use a DATETIME field in your table and do something like:

SELECT * FROM FilmListings WHERE date_time = CURDATE() LIMIT 10 ORDER BY date_time
Forum: PHP 06-03-2009, 09:07 PM
Replies: 1
Views: 495
Posted By devinemke
i prefer PHPmailer...

i prefer PHPmailer (http://phpmailer.codeworxtech.com) as it allows to send attachments
Forum: PHP 05-18-2009, 06:16 PM
Replies: 3
Views: 667
Posted By devinemke
read up on header (http://www.php.net/header)....

read up on header (http://www.php.net/header). there are specific examples on how to force download.
Forum: PHP 05-15-2009, 11:11 PM
Replies: 2
Views: 682
Posted By devinemke
or simply use mysql_insert_id...

or simply use mysql_insert_id (http://www.php.net/mysql_insert_id) after your INSERT query
Forum: PHP 05-06-2009, 09:40 PM
Replies: 3
Views: 636
Posted By devinemke
a simple example: <?php function form() ...

a simple example:

<?php
function form()
{
echo '<form action="" method="post">';

for ($i = 1; $i <= 5; $i++)
{
echo '<input type="checkbox" name="users[]" value="' . $i . '"'; if...
Forum: PHP 05-06-2009, 09:18 PM
Replies: 5
Views: 1,645
Posted By devinemke
if ($required_fields_check) { foreach...

if ($required_fields_check)
{
foreach ($required_fields as $value)
{
if ((!isset($_REQUEST[$value]) || empty($_REQUEST[$value])) && (!isset($_FILES[$value]['name']) ||...
Forum: PHP 05-05-2009, 08:35 PM
Replies: 4
Views: 2,453
Posted By devinemke
do you have any control over the...

do you have any control over the https://www.mcssl.com/app/contactsave.asp script? if so add whatever hidden form fields you want. it appears to be a hosted cart system. i assume they let you add...
Forum: PHP 05-05-2009, 08:28 PM
Replies: 2
Views: 619
Posted By devinemke
header('location: http://www.example.com'); ...

header('location: http://www.example.com');
exit();
Forum: PHP 04-27-2009, 07:18 PM
Replies: 2
Views: 435
Posted By devinemke
you could make all of your paths absolute or for...

you could make all of your paths absolute or for more portability use make everything relative using $_SERVER['DOCUMENT_ROOT']
Forum: PHP 04-27-2009, 07:08 PM
Replies: 1
Views: 622
Posted By devinemke
i suggest you store files in a temp directory and...

i suggest you store files in a temp directory and then run a cron every hour to delete files that have idle for an hour or more.
Forum: PHP 04-09-2009, 09:58 PM
Replies: 2
Views: 740
Posted By devinemke
a very simple example: <?php function...

a very simple example:

<?php
function form()
{
if (isset($_POST['name'])) {$name = $_POST['name'];} else {$name = '';}
if (isset($_POST['email'])) {$email = $_POST['email'];} else {$email =...
Forum: PHP 04-09-2009, 08:40 PM
Replies: 6
Views: 1,241
Posted By devinemke
if (isset($_GET['s'])) {include('admin/pages/' ....

if (isset($_GET['s'])) {include('admin/pages/' . $_GET['s'] . 'php');} else {include('admin/pages/start.php');}
Forum: PHP 04-08-2009, 10:11 PM
Replies: 3
Views: 610
Posted By devinemke
if you are using PHP 5 then you should use...

if you are using PHP 5 then you should use scandir (http://www.php.net/scandir)

$scandir = scandir('.');
$dirs = array();
$files = array();
foreach ($scandir as $value)
{
if ($value != '.'...
Forum: PHP 04-08-2009, 10:02 PM
Replies: 6
Views: 750
Posted By devinemke
from the PHP manual...

from the PHP manual (http://www.php.net/manual/en/function.mail.php):

i personally use the PHPMailer (http://phpmailer.codeworxtech.com) class as many of the bulk mails i send have attachments
Forum: PHP 04-06-2009, 07:14 PM
Replies: 2
Views: 693
Posted By devinemke
have you considered using PHP's built-in ZIP...

have you considered using PHP's built-in ZIP functions (http://www.php.net/manual/en/book.zip.php) rather than calling the ZIP exe?
Forum: PHP 03-16-2009, 08:14 PM
Replies: 2
Views: 631
Posted By devinemke
$fruit = array('apples', 'oranges'); ...

$fruit = array('apples', 'oranges');
$FruitsAndVegs = array('apples' => 'red', 'oranges' => 'orange', 'eggplant' => 'purple');

foreach ($FruitsAndVegs as $key => $value)
{
if (in_array($key,...
Forum: PHP 03-04-2009, 09:56 PM
Replies: 2
Views: 479
Posted By devinemke
$tpl->setDir($_SERVER['DOCUMENT_ROOT'] ....

$tpl->setDir($_SERVER['DOCUMENT_ROOT'] . '/products/templates/' . $style . '/');
Showing results 1 to 25 of 443

 
Forum Jump

All times are GMT +1. The time now is 06:33 PM.