Search found 1975 matches

by JAM
Mon Jan 19, 2015 4:52 pm
Forum: General Discussion
Topic: Introduce Yourself!
Replies: 1038
Views: 681418

Re: Introduce Yourself!

twigletmac wrote:I've decided to post this thread in response to a suggestion posted by cactus. So whether you're new to the forums or not, here's where you can say hi, who you are and what you're into.

Mac
This...

...was some time ago. Sorry, just had to walk down the memorylane. :wink:
by JAM
Tue Feb 26, 2008 1:35 pm
Forum: PHP - Code
Topic: echo code which contains a function call
Replies: 8
Views: 396

Re: echo code which contains a function call

Remove the ; from the call... And add echo's..

Code: Select all

<?php
    function foo() {
        return 'bar';
    }
    echo 'Something '.foo().' here!';
 
    // or...
 
    function foo_two() {
        echo 'bar';
    }
?>
Something <?php foo_two(); ?> here!
Edit; Better examples... Hopefully... ;)
by JAM
Mon Feb 25, 2008 10:57 am
Forum: PHP - Code
Topic: imagecreation problems help plz
Replies: 3
Views: 401

Re: imagecreation problems help plz

What does this gove you;

Code: Select all

<pre><?php
 print_r(gd_info());
?></pre>
by JAM
Mon Feb 25, 2008 10:55 am
Forum: PHP - Code
Topic: RegEx URL
Replies: 3
Views: 171

Re: RegEx URL

Tried using substr() and other functions to it? I wasn't trying to imply that parse_url() was the only function you needed. Example;     $url = 'http://www.mysite.com/news/cat-112.html';     $array = parse_url($url);     echo substr($array['path'], 0, 10); You don't even have to use parse_url() and ...
by JAM
Sun Feb 24, 2008 1:08 pm
Forum: PHP - Code
Topic: RegEx URL
Replies: 3
Views: 171

Re: RegEx URL

You could use parse_url() to get the part of the URL youre interested in, then do the if-then-else on that.
by JAM
Mon Feb 18, 2008 6:22 am
Forum: PHP - Code
Topic: Session errors from maybe the web server??
Replies: 1
Views: 85

Re: Session errors from maybe the web server??

Yah, most likely the server. The server is missing the temp directory and/or doesn't have it writeable. Never seen a hosting company use c:\temp...
Contact them with this error. It's a very basic error and they should know how to fix it...
by JAM
Wed Feb 13, 2008 6:37 am
Forum: PHPDN Suggestions
Topic: [SOLVED] mod
Replies: 4
Views: 4871

Re: [SOLVED] mod

I wish education worked as well as most folks believe it to. It would be so nice to have members actually edit their own titles to say [solved]. I know I have done this for posters in the past, but it gets old really fast. Perhaps this is something we can look into. Yah, I know what you mean. The m...
by JAM
Mon Feb 11, 2008 12:40 pm
Forum: PHP - Code
Topic: reg ex inside of nested for loops, inside of a function
Replies: 3
Views: 139

Re: reg ex inside of nested for loops, inside of a function

Not quite sure what you want to do with the colors, but the x*y part could look like this;         $funcArgs = func_get_args(); // return an array with the elemets passed to the function         list($x , $y) = split('x', $funcArgs[7]); // add this to get $x and $y         echo '<table border="...
by JAM
Mon Feb 11, 2008 12:23 pm
Forum: PHP - Code
Topic: Help on Logic in IF statement
Replies: 4
Views: 139

Re: Help on Logic in IF statement

Use and instead of or . Your way will always result in false, as both cannot be the same at the same time.     if ($uploaded_type != "image/jpeg" && $uploaded_type != "image/png") {         echo "You may only upload JPEG or PNG files.<br><br>";         $ok=0;   ...
by JAM
Sun Feb 10, 2008 2:40 pm
Forum: PHPDN Suggestions
Topic: [SOLVED] mod
Replies: 4
Views: 4871

[SOLVED] mod

You should add the solved mod again. Don't have to be the one I posted before, you could use a Greasemonkey script. :wink: You should also try to make people understand why this titlechange is good to have, editing the rule/good-to-have-pages with this info. I personally like the idea for two reason...
by JAM
Sun Feb 10, 2008 2:24 pm
Forum: PHP - Code
Topic: Superglobals and Variables in URLs?
Replies: 5
Views: 200

Re: Superglobals and Variables in URLs?

Here's an example of doing this using .htaccess as using ini_set() (another 'php' way/function) wont work good enough. php_flag register_globals on You could also make something as;     foreach($_GET AS $key => $value) {         ${$key} = $value;     } But, you should take the time and change it all...
by JAM
Sun Feb 10, 2008 2:11 pm
Forum: PHP - Code
Topic: test if mp3 file exists and offer link to allow it to play
Replies: 2
Views: 144

Re: test if mp3 file exists and offer link to allow it to play

You could use file_exists($view.'.mp3') to check for... file existance... instead of a loop.

Edit; If you don't want to learn and just need the actual code, you could post a question in the job-searching-part of the forums.
by JAM
Sun Feb 10, 2008 4:12 am
Forum: PHP - Code
Topic: $_POST variable not working?
Replies: 12
Views: 360

Re: $_POST variable not working?

if(isset($_POST['availablevouchers'])) { Youre not using 'availablevouchers' anywhere? Edit; And as previous speaker thinks; your code is not well thought through. If it works for you, it's okay, but a heads up might be in order. But intead of using the loop I'd look into moving from $_POST to $_GE...
by JAM
Tue Feb 05, 2008 1:06 pm
Forum: PHP - Code
Topic: Wrong Character Input
Replies: 8
Views: 483

Re: Wrong Character Input

I was messing with the following, but I really don't want to play with Word anymore
:lol:

You could, if it's possible, to try saving the file(s) in rtf and then try reading them again. Might get you a different result. Not usable in the long way if you want to use other's sources tho...
by JAM
Tue Feb 05, 2008 1:03 pm
Forum: PHP - Code
Topic: New to PHP
Replies: 8
Views: 824

Re: New to PHP

http://www.wampserver.com/en/ is all-ion-one (well, basicly, for beginners), that might be of interest if you don't want to dwell into deeper settings within the apache, php and mysql settings. You wont learn as much, but you might want to take it one step at a time... Other ideas is to drop (or mov...