Skip to content
WJunction - Webmaster Forum

php issue - any help? :P

Status
Not open for further replies.

vps9Ryan

Experienced Member
803
2010
26
Hi guys,

Im not a php expert myself, if any one has any idea how to get this fixed id appreciate it.


PHP:
<?php

$widget_comment_configuration = array(
     "auto_approve"    => true,  // Automatically approve comments as they are posted?
    "do_captcha"    => true, // Do we display a simple captcha question to help prevent spam?
    "display_avatars"    => false, // Do we display gravatars next to comment 

    // overwrite default uri, useful for ?dynamic=pages. 
    // note:  users will be redirected here after posting a comment.
	
    "uri"    => "profile.php?id="<?php echo urlencode($dnn['id']); ?>"",  
     
);
include("run_script.php");

?>

Basically since the profile.php is dynamic - im trying to encode the url with the 'id' ... but i get syntax error - i even tried removing the <?php ?> since they are already above and below but to no avail.

so basically all that needs fixing is :

PHP:
 "uri"    => "profile.php?id="<?php echo urlencode($dnn['id']); ?>"",

Any ideas? :facepalm:

Cheers,
Myself.
 

2 comments

u dont need to use <?php tags inside array
this should fix ur issue
PHP:
<?php 


$widget_comment_configuration = array( 
     "auto_approve"    => true,  // Automatically approve comments as they are posted? 
    "do_captcha"    => true, // Do we display a simple captcha question to help prevent spam? 
    "display_avatars"    => false, // Do we display gravatars next to comment  

    // overwrite default uri, useful for ?dynamic=pages.  
    // note:  users will be redirected here after posting a comment. 
     
    "uri"    => "profile.php?id=" . urlencode($dnn['id'])
      
); 
include("run_script.php"); 

?>
 
Status
Not open for further replies.

About the author

V
Experienced Member · Joined
803
Messages
26
Reactions
28
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom