0

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>

Edited by nav33n: Please wrap your code in [code][/code] tags for easy readability.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by cereal
0

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.

0

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

0

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]

Edited by cwarn23: added info

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.