Forum: PHP May 7th, 2009 |
| Replies: 2 Views: 730 ensure that you don't have any whitespace after the closing php '?>' tag in your include files and that you are not echoing or printing anything prior to sending headers with the header() function.... |
Forum: PHP Jul 23rd, 2008 |
| Replies: 2 Views: 319 you want pagination.
check out a couple of scripts in the snippets section...
http://www.daniweb.com/code/snippet341.html
http://www.daniweb.com/code/snippet612.html
pagination is pretty... |
Forum: PHP Jul 23rd, 2008 |
| Replies: 1 Views: 1,188 try specifying method='POST" in all of of your <form> tags...like so:
<form name="pointofcontact" action = "saveproject.php" method="POST">
it seems like some of your forms are defaulting... |
Forum: PHP Jul 23rd, 2008 |
| Replies: 4 Views: 726 JavaScript would be the way to go.
You'll probably get better help in the JavaScript/AJAX/DHTML forum on this one. |
Forum: PHP Jul 23rd, 2008 |
| Replies: 14 Views: 874 I believe you can only use a write mode such as 'a+' with fopen on a remote file if using ftp:// as the protocol...even so, you would have to have appropriate ftp permissions to write/append. More... |
Forum: PHP Jul 23rd, 2008 |
| Replies: 3 Views: 1,677 Yes, this is where the issue lies. The onchange attribute of each of your select boxes is set to redirect to a page as soon as an option is selected. The page is determined by the selected option's... |
Forum: PHP Jul 13th, 2008 |
| Replies: 3 Views: 430 you could use a for loop rather than a while statement. For example:
$howMany=$_POST["hmany"];
for($i=0;$i<=$howMany;$i++)
{
$rand=mt_rand(1,$_POST["dice"]);
echo "You rolled a... |
Forum: PHP Jul 13th, 2008 |
| Replies: 13 Views: 1,066 actually, this will just print the value of $abc (nothing) with the value of $i appended to the end. If you have variables $abc1, $abc2, etc. , you will not get the value of those variables, you'll... |
Forum: PHP Jul 12th, 2008 |
| Replies: 7 Views: 646 the modulus operator (%) takes the left side, divides it by the right side, and returns the remainder. So, 5%3 would result in two, since 5/3 yields a remainder 2.
If you are getting a division... |
Forum: PHP Jul 12th, 2008 |
| Replies: 13 Views: 1,066 you were close here. Just a small change:
for($i=1; $i<=3; $i++)
{
echo $abc[$i];
}
or for unknown array size, use: |
Forum: PHP Jun 6th, 2008 |
| Replies: 3 Views: 707 like the user said, if the POST variables aren't set, the code won't execute. Even if they are, the code won't execute the second time around if the user was validated on the first run, because your... |
Forum: PHP Apr 16th, 2008 |
| Replies: 1 Views: 450 you'll get that warning when trying to call session_start after outputting content to the browser with something like echo or print, or if you have embedded PHP that calls a session_start following... |
Forum: PHP Mar 24th, 2008 |
| Replies: 3 Views: 2,179 try encoding your str1 with encodeURIComponent
more about this at w3schools (http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp) |
Forum: MySQL Mar 13th, 2008 |
| Replies: 2 Views: 868 the syntax of your query is ok. Something else is going on here. Can you post more code or any MySQL errors you are getting? |
Forum: PHP Mar 8th, 2008 |
| Replies: 4 Views: 1,064 to encode it in php...
<?php
//encode input going in...
$encode = urlencode("in'out\"");
//decode output coming out...
$decode = urldecode($encode); |
Forum: PHP Mar 8th, 2008 |
| Replies: 3 Views: 546 another way to tackle it would be...
echo '<td align=center style="width: 30px"><strong><a href="' . $link1 . '" style="color: red">CID</a></strong></td>'; |
Forum: PHP Mar 8th, 2008 |
| Replies: 3 Views: 546 echo "<td align=center style=\"width: 30px\"><strong><a href=\"$link1\" style=\"color: red\">CID</a></strong></td>"; |
Forum: PHP Mar 6th, 2008 |
| Replies: 4 Views: 986 'L' returns 1 if it is a leap year or 0 if it is not. Use 'Y' for 4-digit year. |
Forum: PHP Mar 6th, 2008 |
| Replies: 4 Views: 986 <?php
//old time
$old_time = '2008-03-05 18:05:44';
//convert to UNIX timestamp
$timestamp = strtotime($old_time);
//fetch new format
$new_time = date('m-d-Y H:i:s' , $timestamp); |
Forum: PHP Mar 3rd, 2008 |
| Replies: 6 Views: 2,906 Working off the code sample in my earlier post...
Here would be one way to ensure the checkboxes were checked if they had chosen them previously...
//array to hold checkbox options... |
Forum: PHP Mar 1st, 2008 |
| Replies: 3 Views: 541 mmmmmmm cookies...
<?php
//make a batch of cookies
//pass name of array as $batchName, and the values you wish to store as an array $valueArray
function batch_of_cookies($batchName,... |
Forum: PHP Mar 1st, 2008 |
| Replies: 1 Views: 1,030 try changing your code like this:
while($row = mysql_fetch_array($resultmoto))
{
$data = $row[1];
$leg = $row[0];
$chart [ 'chart_data' ][ 0 ][ $bar ] = $data;
$chart [ 'chart_data' ][... |
Forum: PHP Mar 1st, 2008 |
| Replies: 3 Views: 13,642 syntax is the same as c. for example:
<?php
for($i=0; $i < 50; $i++)
{
//skip numbers 4
if($i == 4)
{
continue; |
Forum: PHP Feb 27th, 2008 |
| Replies: 6 Views: 674 echo your option tags inside of a select tag like this:
<select name="test" id="test">
<option value="value 1">option 1</option>
<option value="value 2">option 2</option>
<option... |
Forum: PHP Feb 24th, 2008 |
| Replies: 17 Views: 1,266 also, just to make sure we're not missing something obvious here...you are saving the page as .php extension right? |
Forum: PHP Feb 24th, 2008 |
| Replies: 17 Views: 1,266 you only have to use commas if you want commas to appear in the output
what part is not working, Everything seems to work when I run it...what are you trying to do? |
Forum: PHP Feb 23rd, 2008 |
| Replies: 11 Views: 1,209 |
Forum: PHP Feb 16th, 2008 |
| Replies: 3 Views: 542 glad to be of assistance! |
Forum: PHP Feb 16th, 2008 |
| Replies: 3 Views: 542 try these changes...I put some comments where I thought they might help you understand what I changed...
<?php
$accountname = $_POST['accountname'];
$phone = $_POST['phone'];
$fax =... |
Forum: PHP Feb 16th, 2008 |
| Replies: 2 Views: 466 to do a site like that, you're going to need secure form processing, some database interactivity to store sales records and customer info, and some email scripts to communicate with your customers.... |
Forum: PHP Feb 14th, 2008 |
| Replies: 36 Views: 3,503 i assume you have root access to the server to set configurations etc....
I am not a phpmyadmin maestro, so you might be better off posting this in a linux/wamp forum depending on your server... |
Forum: PHP Feb 14th, 2008 |
| Replies: 9 Views: 2,411 at the top of your config.php you start output buffering, but have commented it out:
//ob_start("ob_gzhandler");
that probably means that the script sends headers throughout it...you may want... |
Forum: PHP Feb 13th, 2008 |
| Replies: 2 Views: 487 have you checked out the igoogle documentation ?
http://code.google.com/apis/gadgets/index.html |
Forum: PHP Feb 13th, 2008 |
| Replies: 17 Views: 1,048 on line 53 you say:
die(echo($errors)[0] );
to take care of the parse error you can change this to :
die($errors[0]); |
Forum: JavaScript / DHTML / AJAX Feb 13th, 2008 |
| Replies: 3 Views: 1,482 try modifying your code like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title> Test... |
Forum: PHP Feb 13th, 2008 |
| Replies: 3 Views: 4,240 as nav33n pointed out, there are other issues going on in this script, but if you change your code like so, you should get the siri=xxx as you wanted...
foreach ($_POST[status_batch] as $key=>... |
Forum: PHP Feb 13th, 2008 |
| Replies: 9 Views: 2,411 If you try to call session_start() after any content has been output to the page, you will get this error. Make sure that none of your included files are outputting any content to the page such as... |
Forum: PHP Feb 13th, 2008 |
| Replies: 6 Views: 3,266 i usually just insert the path to the location of the image, so I'm not well versed in storing the actual image data in and retrieving it from the database...I stumbled across this tutorial on... |
Forum: PHP Feb 12th, 2008 |
| Replies: 6 Views: 3,266 something along these lines...you'll need to tweak it to fit your script, but you should get the idea...
//connect to mysql with your variables here...
//execute your sql query(s), store result... |
Forum: PHP Feb 12th, 2008 |
| Replies: 5 Views: 904 if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
change the above code (starts on line 11) so that it looks like this: |