Search Results

Showing results 1 to 40 of 64
Search took 0.01 seconds.
Search: Posts Made By: johnsquibb ; Forum: PHP and child forums
Forum: PHP May 7th, 2009
Replies: 2
Views: 781
Posted By johnsquibb
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: 323
Posted By johnsquibb
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,223
Posted By johnsquibb
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: 732
Posted By johnsquibb
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: 885
Posted By johnsquibb
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,714
Posted By johnsquibb
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: 435
Posted By johnsquibb
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,077
Posted By johnsquibb
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: 655
Posted By johnsquibb
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,077
Posted By johnsquibb
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: 720
Posted By johnsquibb
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: 457
Posted By johnsquibb
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,205
Posted By johnsquibb
try encoding your str1 with encodeURIComponent

more about this at w3schools (http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp)
Forum: PHP Mar 8th, 2008
Replies: 4
Views: 1,085
Posted By johnsquibb
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
Solved: echo statement
Views: 554
Posted By johnsquibb
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
Solved: echo statement
Views: 554
Posted By johnsquibb
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: 1,001
Posted By johnsquibb
'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: 1,001
Posted By johnsquibb
<?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,927
Posted By johnsquibb
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: 547
Posted By johnsquibb
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,039
Posted By johnsquibb
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,745
Posted By johnsquibb
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
Solved: OPTION problem
Views: 680
Posted By johnsquibb
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,277
Posted By johnsquibb
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,277
Posted By johnsquibb
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,220
Posted By johnsquibb
like flow charts?
Forum: PHP Feb 16th, 2008
Replies: 3
Views: 547
Posted By johnsquibb
Forum: PHP Feb 16th, 2008
Replies: 3
Views: 547
Posted By johnsquibb
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: 471
Posted By johnsquibb
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,548
Posted By johnsquibb
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,458
Posted By johnsquibb
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: 493
Posted By johnsquibb
have you checked out the igoogle documentation ?

http://code.google.com/apis/gadgets/index.html
Forum: PHP Feb 13th, 2008
Replies: 17
Views: 1,058
Posted By johnsquibb
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: PHP Feb 13th, 2008
Replies: 3
Views: 4,247
Posted By johnsquibb
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,458
Posted By johnsquibb
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,310
Posted By johnsquibb
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,310
Posted By johnsquibb
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: 912
Posted By johnsquibb
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:
Forum: PHP Feb 12th, 2008
Replies: 6
Views: 2,927
Posted By johnsquibb
since most people will probably never pick more than a few, it would save space to only have one column.

try this:

<?php
//multi-list boxes post an array of results
//get this array into a...
Forum: PHP Feb 12th, 2008
Replies: 5
Views: 912
Posted By johnsquibb
any chance you can post the code?
Showing results 1 to 40 of 64

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC