|
Posted by Jerry Stuckle on 11/17/06 03:42
casper christensen wrote:
> Jerry Stuckle skrev:
>
>>casper christensen wrote:
>>
>>>Hi
>>>
>>>well after screwing around I found out how to make it work. thanks..
>>>but....
>>>
>>>Now I found out the first code...getting the database id....isn't
>>>really working:(
>>>
>>>It writes the id as "123" everytime. How else can i get the id. I can
>>>see the id in the admin panel, so it writes it somehow..
>>>
>>>any good ideas
>>>
>>>Casper
>>>
>>
>>Casper,
>>
>>That's an awful lot of code to go through to find a problem like that.
>>Do you have it on a web page so we can see what you're getting? It's
>>hard to test it here without your database...
>>
>>Also, when I get strange problems like this I just start commenting out
>>the code - make it as simple as possible. An alternative is to put echo
>>statements at critical points in your code (i.e. in loops where you're
>>retrieving the value) to see what it shows. It's helped me find a lot
>>of nasty bugs. Note that depending on where it is in the html and what
>>browser you're using, you may have to look at your page source to see
>>the output.
>>
>>
> Hi
>
> well, I have no idea what you're talking about:)
>
> I don't know anything about php, but i guess the problem in writting:
>
> http://www.affiliatesjunction.net/directory.php?ax=out&id=<?=$id?>
>
> wich was the first idea, is that it doesn't really say what id. right?
>
> just tell me exactly what you need to figure out this problem and I'll
> do my best!
>
> sincerely
> Casper
>
> thanks for helping me out guys!:)
>
>
(Top posting fixed)
You code will only work if you have short_tags turned on (in your
php.ini file). That's not generally the case any more (for one thing it
conflicts with XML).
Rather, you are correct in your code when you use:
...<?php echo $id; ?>
As to which id it's using - it depend on where you put it. But I found
three similar lines in your code, so I'm not sure which one you're
referring to.
Also, you might want to either learn PHP or hire a consultant to give
you a hand. I think you've may have bitten off more than you can chew
right now.
As for getting the correct ID - I'm confused as to where you mean
because of the multiple similar lines in your code.
Which page does is your code for? It might help if I could look at the
failing page.
Also, here on Usenet, we help people - but those people also need to be
helping themselves. We'll help with specific questions, we'll refer you
to documents as appropriate, and help you out as much as possible. But
this stops at trying to find a bug in several hundred lines of code. I
don't have the several hours it could take to chase down a bug in that
large of a chunk of code, and I doubt many people here do. I'd have to
recreate your database, load it with data, then start testing.
That's why I suggested you do some initial debugging on your own -
something anyone who uses PHP needs to learn to do anyway.
P.S. Please don't top post. Thanks.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|