-
Posts
1,842 -
Joined
-
Last visited
Posts posted by marcus
-
-
.htaccess
AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php .php .htm .html
-
<script language="Javascript"> function chex(id){ var val = document.getElementById(id).value; var newval = val.replace(/,/g,''); var finished = newval.replace(/\$/gi,''); document.getElementById(id).value = finished; } </script> <form method="get" onSubmit="chex('txt');chex('txt2')"> <input type="text" name="txt" id="txt"><br> <input type="text" name="txt2" id="txt2"> <input type="submit"></form>
tested and worked fine.
-
I say you just open the registration pay in a new window, like a pop-up and when the form is done processing use window.close()
-
<?php ob_start(); // your code ob_end_flush(); ?>
buffer the data
-
No, you could do something like this.
<?php function color($c,$txt){ return "<font color=\"".$c."\">".$txt."</font>"; } $sql = "SELECT * FROM `users` ORDER BY username ASC"; $res = mysql_query($sql) or die(mysql_error()); $x = 0; while($row = mysql_fetch_assoc($res)){ if($x % 2){ echo color('red',$row['username']) . " "; }else { echo color('blue',$row['username']) . " "; } $x++; } ?>
-
hmm, like just repeating red and blue?
<?php $data = range(1,50); function color($c,$txt){ return "<font color=\"".$c."\">".$txt."</font>"; } $x = 0; foreach($data AS $lemons){ if($x % 2){ echo color('red',$lemons) . " "; }else { echo color('blue',$lemons) . " "; } $x++; } ?>
results: http://i34.tinypic.com/wungvb.jpg
-
$tgl is never defined.
-
<?php echo date("m d y",1218430800); ?>
I get
08 11 08
-
I'm not so good at regex, but you could just use str replace
<?php $string = "onetwothreefourfive"; $array = array("one","two","three","four","five"); function color($c,$txt){ return "<font color=\"".$c."\">".$txt."</font>"; } $repl = array(color('blue','one'),color('red','two'),color('blue','three'),color('red','four'),color('blue','five')); echo str_replace($array,$repl,$string); ?>
-
echo "<div align=\"center\"><a href=\"membersloggedin.php?Uname=".$_POST['Uname']."&Password=".$_POST['Password']."\">Please click here to continue.</a></div>";
-
Well obviously my $time variable was in reference to yours, so yes.
-
echo date("m d, Y",$time);
-
$rlemail = $vbulletin->db->query_first("SELECT email FROM " . TABLE_PREFIX . " user WHERE userid = " . $vbulletin->userinfo['userid'] ."") or die(" rlemail error: ".$userid . mysql_error());
-
mysql_query('query') or die(mysql_error());
-
Do the queries before hand and make sure they're correct.
-
Line 19 and 30 are }
-
Then do like.
<div style="height:600px;display:block;overflow:auto;width:100%"> <!-- your table --> </div>
-
Set the value of the Please Select to 0.
Then change this line
If($_POST['processform'] != 1) {
to
if(!$_POST['processform']) {
-
I don't see why he would necessarily have to use concatenation in this.
Are you sure the input name for the "name" variable is name?
-
You don't see your problem?
Look:
<?php session_start(); $me = "marcus"; $_SESSION['$me'] = "fail session"; $_SESSION[$me] = "correct session"; print_r($_SESSION); ?>
Results:
Array ( [$me] => fail session [marcus] => correct session )
Don't use the single quotes when you're defining and unsetting the sessions.
-
You're probably better off just defining individual variables.
$cost1 = $_POST['cost1']; $cost2 = $_POST['cost2']; $cost3 = $_POST['cost3'];
Or something like
$cost[] = $_POST['cost' . $i]; // inside your while statement echo array_sum($cost); // after your while statement
-
No, if there's no value in the variable already, technically it won't exist.
-
ohaha, i was just editing from my first example
-
Then obviously $Data['entry'] does not exist.
content type for php header
in PHP Coding Help
Posted
You can try a force download of the file.