n3ightjay
-
Posts
64 -
Joined
-
Last visited
Never
Posts posted by n3ightjay
-
-
you urls are set up wrong :
http://www.mywebsite.com/php=id?001
should be:
http://www.mywebsite.com/php?id=001
then you could just do something like
if($_GET['id'] == 001){
include(whatever.php);
}
but if you have alot of users you might want to learn a sql or you could name the include files with there ids instead and make a call like:
if(isset($_GET['id'])){
include('header' . $_GET['id'] . '.php'); // header001.php for example
}
-
Hi All im considering a new website venture ... with Credit card processing , i've never diped into this before (except via paypal) so say i have a brick and mortar buisness set up with a CC terminal what direction do i head in and what obsticles should i consider before taking on this task
Just hit me with anything you can think of
Thanks in advance
-
a side note .. i agree the logic of your problem needs to be re-assessed
-
Some language i don't know ... but runs cron jobs for you ... maybe further searching could find an english version ... but just shy of hitting a page yourself every 2 hours or some demented javascript page that you have to keep open all the time this is the only option i can see for you dilema of not being able to set up a cron job
-
$q = mysql_query('select * from `whatEVER` limit 0, 10');
while($results = mysql_fetch_row($q)){
// display results
}
assuming your using mysql
-
<? $self = $_SERVER['SCRIPT_FILENAME']; if ($self != '/home/whole/public_html/login.php' && $_GET['action'] != 'process') { ?>
This should also work
-
-
<select name="month" onChange="javascript:document.forms['form1'].submit();"> <? for($newI = 0; $newI <= 3; $newI++){// $newJ <= 3 = 3 years ahead for($newJ = 0; $newJ <= 12; $newJ++){ $dateValue = date("n Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI)); ?> <option value="<?=$dateValue;?>" <? if($_POST['month']==$dateValue){echo "selected";}?>><?=date("F Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?></option> <? } } ?> </select>
That should fix both problems
Cheers
-
This definately is a HTML table layout issue.. try writing the page in pure HTML first then adding in the php ..
-
I don't know curl ... but to "slow down" a script sleep(seconds)
http://ca3.php.net/manual/en/function.sleep.php
-
Try This:
Replace
<?php include_once('_init.php'); if(isset($_POST['month'])){ $_GET['month'] = $_POST['month']; }else{ if($_GET['date'] != ''){ $exp = explode('-', $_GET['date']); $_GET['month'] = $exp[1]; }else{ $_GET['month'] = date('m'); } } $_GET['date'] = '01-'.$_GET['month'].'-'.date('Y'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
with this
<?php //include_once('_init.php'); if(isset($_POST['month'])){ $temp = explode(" ",$_POST['month']); $_GET['month'] = $temp[0]; $_GET['year'] = $temp[1]; }else{ if($_GET['date'] != ''){ $exp = explode('-', $_GET['date']); $_GET['month'] = $exp[1]; }else{ $_GET['month'] = date('m'); } $_GET['year'] = date('Y'); } $_GET['date'] = '01-'.$_GET['month'].'-'.$_GET['year']; ?>
And This
<select name="month" onChange="javascript:document.forms['form1'].submit();"> <? select_array($array_month, $_GET['month']);?> </select>
with this:
<select name="month" onChange="javascript:document.forms['form1'].submit();"> <? for($newI = 0; $newI <= 3; $newI++){// $newJ <= 3 = 3 years ahead for($newJ = 0; $newJ <= 12; $newJ++){ ?> <option value="<?=date("n Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?>"><?=date("F Y",mktime(0,0,0,Date("m")+$newJ,1,date("Y")+$newI));?></option> <? } } ?> </select>
Once again be real cautious with the links under the dates as I can't follow the updates effect on the sql querys
-
A little more
if(mail('*******@gmail.com',$subject,$message,$headers)){ header('Location: /thankyou.php'); }else{ header('Location: /error.php'); }
Just checks to make sure there wasn't an error sending the mail and having the user get hung up on an error page
-
To simply shift the calendar from monday to sunday try this date call in your calendar output:
<td width="100" align="center" class="<?=$class;?>"><?=date("j", mktime(0,0,0,$zi[1], ($j+($i*7))-date("w",mktime(0,0,0,$zi[1],0,$zi[2])),$zi[2])).$detail;?></td>
this will undoubtedly mess up the querys associated above it ... but using the same alteration to the date in the querys should be a starting point but it's something im not going to attempt without the database itself.
As for the month it has to be altered in your include_once(_init.php) file which i obviously don't have access to.
How do I force images (content) to appear based on URL variable?
in PHP Coding Help
Posted
yes you could do that to