im trying to insert paypal donation code into a php file. i keep getting errors. so here is the code i have to work with.

<?
begin_block("Donate");
echo "<BR><BR><CENTER>This would need to contain your donation code, or something. maybe even a paypal link</CENTER><BR><BR>";
echo "<a href=\"member.php?mid=$row[mid]\">$row[login]</a>";
end_block();
?>

And here is the what i would like to insert into that php file

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="CP5UEJVJ9FG6C">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Try replacing your first script with the following.

<?
begin_block('Donate');
echo '<BR><BR><CENTER>This would need to contain your donation code, or something. maybe even a paypal link</CENTER><BR><BR>';
echo '<a href="member.php?mid='.$row['mid'].'">$row[login]</a>';
end_block();
?>

Also don't forget to include the api file.

Try replacing your first script with the following.

<?
begin_block('Donate');
echo '<BR><BR><CENTER>This would need to contain your donation code, or something. maybe even a paypal link</CENTER><BR><BR>';
echo '<a href="member.php?mid='.$row['mid'].'">$row[login]</a>';
end_block();
?>

Also don't forget to include the api file.

thats the same code

thats the same code

If you read it more closely you will see that I changed how the array was added to the echo function and I changed the quotes type so you didn't have to escape the double quotes.

[edit]
Discovered a bug in my code...

<?
begin_block('Donate');
echo '<BR><BR><CENTER>This would need to contain your donation code, or something. maybe even a paypal link</CENTER><BR><BR>';
echo '<a href="member.php?mid='.$row['mid'].'">'.$row['login'].'</a>';
end_block();
?>

[/edit]

It isn't the same, he replaced double quotes with single quotes, check line 4. By the way, give us the error message you get from that code. Bye.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.