Search Results

Showing results 1 to 40 of 40
Search took 0.01 seconds.
Search: Posts Made By: langsor ; Forum: PHP and child forums
Forum: PHP Sep 10th, 2008
Replies: 12
Views: 1,778
Posted By langsor
Hi,

For debugging purposes I would do something like what Anthony is suggesting.

I would locate an image in the images directory, say G493075_101_12.jpg, and find it's database ID ... then in a...
Forum: PHP Sep 8th, 2008
Replies: 3
Views: 909
Posted By langsor
I would say that kkeith has got the answer here...look at what the browser is seeing

<?php
$var1 = array('this' => 'that');
?>

<...>

Looks like a tag to a browser ... even though it...
Forum: PHP Sep 3rd, 2008
Replies: 4
Views: 497
Posted By langsor
Last word ...

the "\n" is a newline-linebreak in scripting-lingo. It is like a soft carriage return.
In PHP the newline character \n must be in double-quotes to not be displayed literally, thus...
Forum: PHP Sep 3rd, 2008
Replies: 4
Views: 497
Posted By langsor
Aaak, use the CODE tags for your script code!


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta...
Forum: PHP Sep 3rd, 2008
Replies: 1
Views: 1,167
Posted By langsor
Okay, a couple things to think about ...

First, your multiline html text might be better created using PHP's heredoc format

print <<<ENDLINE
<td width="200">
<select name="hospital1">
...
Forum: PHP Sep 3rd, 2008
Replies: 4
Views: 1,138
Posted By langsor
I don't really do much PHP email stuff, but this should work for you. The 'headers' are the From line and optionally some other info too.


<?php
// php mail plain-text email example
$recipient...
Forum: PHP Sep 3rd, 2008
Replies: 4
Views: 1,138
Posted By langsor
Hi,

These are where you're getting the information passed in from your html form $_POST['subject'] and $_POST['message'], so since you have form-fields for name and email, you will want to also...
Forum: PHP Aug 25th, 2008
Replies: 2
Views: 1,098
Posted By langsor
I don't know what the problem was ...

This works

<?php
$recipient = 'seanlubbe@gmail.com'; // used my email for testing ...
$subject = 'Feedback Form Results';
$message =...
Forum: PHP Aug 25th, 2008
Replies: 2
Views: 1,609
Posted By langsor
Something like this should work

<?php
$aClip = array(
array(
Category => "Television",
Link => "vid/01.swf",
Img => "img/25.jpg",
Title => "A Lot in Common"
),
Forum: PHP Aug 18th, 2008
Replies: 5
Views: 668
Posted By langsor
In PHP you would have to submit the child window with the parent window as the form action ...
<form aciton='parent.php" method="POST">
... and grab the submitted child form values in the parent...
Forum: PHP Aug 18th, 2008
Replies: 5
Views: 668
Posted By langsor
I think I know what you're talking about ...
The link you open is a new window and you have selections in that window ... when you click on a selection you want to populate the original (main)...
Forum: PHP Aug 18th, 2008
Replies: 9
Views: 1,834
Posted By langsor
If you removed the first mysql_fetch_row then stick to a while loop, if you left in that first fetch_row then do a do{}while() loop.

Ciao
Forum: PHP Aug 15th, 2008
Replies: 9
Views: 1,834
Posted By langsor
Ahhh, makes perfect sense. Thanks for the explanation.

Ciao
Forum: PHP Aug 15th, 2008
Replies: 9
Views: 1,834
Posted By langsor
I'm not arguing with you architact, but I'm wondering why use a do { ... } while () for database rows?

If I understand that will automatically perform the action at least once. So you should...
Forum: PHP Aug 15th, 2008
Replies: 5
Views: 684
Posted By langsor
I'm providing a lot of wrong information today, I guess I should shut it down for the night.

But first I did a little investigation into your problem -- and I guess you do use the var keyword in...
Forum: PHP Aug 15th, 2008
Replies: 5
Views: 684
Posted By langsor
Before taking a deeper look, it appears that there's been a mixup of PHP and JavaScript variable types ... fix this first and if it still doesn't work let us know.


var $email;
var...
Forum: PHP Aug 15th, 2008
Replies: 9
Views: 1,834
Posted By langsor
It appears that you've included $truedata = mysql_fetch_array() twice but not used it the first time (thus the probable cause of the loss of your first row).

Try it now and let me know if that was...
Forum: PHP Aug 13th, 2008
Replies: 17
Views: 1,247
Posted By langsor
I don't see them from the code you submitted earlier or my updates ... if you want to post your code in total again I'll sift through that for them.

Could they be coming from one of the include...
Forum: PHP Aug 13th, 2008
Replies: 11
Views: 3,354
Posted By langsor
I believe the html standard (if you want your code to validate: http://validator.w3.org/) is that a nested <li></li> must be inside a <ul> container ...

So this is not valid (If I remember...
Forum: PHP Aug 13th, 2008
Replies: 11
Views: 3,354
Posted By langsor
No problem, we all get into the plug-and-play mindset ...

Enjoy
Forum: PHP Aug 13th, 2008
Replies: 11
Views: 3,354
Posted By langsor
Sorry synking, didn't recognize your alias and thought you were someone new posting a question to this thread.

I'm assuming you've closed your while block with curly brakcets, but had a copy-paste...
Forum: PHP Aug 13th, 2008
Replies: 11
Views: 3,354
Posted By langsor
Are you talking about the code I wrote above? If not you should probably start a new thread on this subject.

If you are talking about my code then maybe you could show us the new.php file in...
Forum: PHP Aug 13th, 2008
Replies: 17
Views: 1,247
Posted By langsor
I was laying there in bed trying to go to sleep and realized I had not added the contingency for empty values or empty table cells ...

Try this

$html = '';
while ( $obj = mysql_fetch_object(...
Forum: PHP Aug 13th, 2008
Replies: 17
Views: 1,247
Posted By langsor
Okay, I came in after-the-fact on this post and now I'm going to back up and take it from the start ... wish me luck.

First of all you need to test and make certain you have a 'true' value for...
Forum: PHP Aug 12th, 2008
Replies: 17
Views: 1,247
Posted By langsor
You're right about the not-mismatched ... guess I had already fooled with it some before noticing that I had un-matched the brackets :-\

So, what's not working...are you getting errors, is the...
Forum: PHP Aug 12th, 2008
Replies: 17
Views: 1,247
Posted By langsor
I only found one type of thing wrong on this page, all of your
$zip = (isset($row['zip']) ? $row['zip'] : "&nbsp;");
lines have an unmatched bracket ) on the end of them.
So I changed them to this...
Forum: PHP Aug 12th, 2008
Replies: 11
Views: 3,354
Posted By langsor
Glad to have helped.

BTW, it took me some time to wrap my brain around that little $mapped routine ;-)
Forum: PHP Aug 11th, 2008
Replies: 11
Views: 3,354
Posted By langsor
With a couple minor modifications and a recursive nested list writing function we get this ...
But without the fancy formatting -- that I did by hand to check my work.

<ul>
<li><a...
Forum: PHP Aug 11th, 2008
Replies: 11
Views: 3,354
Posted By langsor
I love programming, programming is my friend ... :-\

Mapping is tricky stuff -- at least for my brain.
Here I've made a multidimensional array of your menu hierarchy from your database results......
Forum: PHP Aug 11th, 2008
Replies: 5
Views: 362
Posted By langsor
The snippet I posted works, based off your original post. Therefore the issue is being produced somewhere in the code you did not show us...

Let's have a look.
Forum: PHP Aug 11th, 2008
Replies: 5
Views: 362
Posted By langsor
Of course you want to use a return not an echo ... right

<?php
class Get_Area {
public function get_area_number( $area, $company='daniweb' ){
echo "$company\n";
return $company;
}...
Forum: PHP Aug 11th, 2008
Replies: 2
Views: 1,545
Posted By langsor
Correct, javascript doesn't know PHP.

Either grab the ID via javascript
window.location="delete.php?id=" + myElement.id;

or write it in with a full PHP script
...
Forum: PHP Aug 9th, 2008
Replies: 2
Views: 1,856
Posted By langsor
There are two ways to tell if a radio button is checked ...
1) submit the form and see what value the name or id contains
2) test the radio button-set with javascript

so to answer your question...
Forum: PHP Aug 7th, 2008
Replies: 26
Views: 3,629
Posted By langsor
Quick question -- what version of PHP are you using ?

If its 4.x then I know what the problem is. If it's 5.x then take a look at the zip file I've attached and give those files a shot on your...
Forum: PHP Aug 7th, 2008
Replies: 26
Views: 3,629
Posted By langsor
Okay, have you tried it with the extra line in my last post added?

$csv->load_file( $out_file );

Let me know and we can figure this out I'm sure ...
Forum: PHP Aug 6th, 2008
Replies: 26
Views: 3,629
Posted By langsor
Okay, I knew there would be some debugging needed ...
In the file that your form is submitting to you will find a line that looks like this ...
$csv->append_table( $data );
In order for you to...
Forum: PHP Aug 6th, 2008
Replies: 26
Views: 3,629
Posted By langsor
Hi,

if your array looks something like this then everything is okay ...

Array
(
[0] => Array
(
[0] => StudID
[1] => StudName
Forum: PHP Aug 6th, 2008
Replies: 26
Views: 3,629
Posted By langsor
enzogoy,

Here is what you can do for your form...

Your html file:

<html>
<body>
<form action="writeToExcel.php" method="post">
<center><h1>Personal Learning Goals Form</h1></center>
Forum: PHP Aug 6th, 2008
Replies: 26
Views: 3,629
Posted By langsor
Hey,

I don't know if anyone is interested but I created a PHP class for MS Excel CSV file handling today ... see attachment to this posting

It's hot off the press and barely tested, just some...
Forum: PHP Aug 4th, 2008
Replies: 26
Views: 3,629
Posted By langsor
I just spent the last several days trying to figure out how to write to an Excel spreadsheet with PHP.

There is a proprietary PHP library for sale at this link:
http://www.eephp.com/
I have not...
Showing results 1 to 40 of 40

 


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

©2003 - 2009 DaniWeb® LLC