Jump to content


Photo

Maknig a "REPLY" Button


  • Please log in to reply
4 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 28 August 2006 - 06:50 AM

I havea  PM system on my site, and I'm having trouble adding a reply button .. Ive tried my own methods that dont work ..they dont produce errors, they just dont work! any ideas??
Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 28 August 2006 - 06:54 AM

Can we see your efforts?

#3 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 28 August 2006 - 07:01 AM

yeah.. its a bunch of code...here and there ..

ok here4s my REPLY BUTTON CODE:
<a href="sendMessage.php?to=<? echo $_GET[$from];?>&id=<? echo$_GET[$id]; ?>"><input type='button' value='-Reply-'></a>
thats supposed to fill the form in sendMessage.php with who the message was from, and the message itself ...

heres the code b4 the reply button:
$query = mysql_query("SELECT * FROM messages WHERE `to` = '$_SESSION[username]' AND `id` = '$id'");
while ($array = mysql_fetch_array($query)){
$from = $array[from];
$id = $array[id];

i think thats it .. its all gone now, it got to confusing.. so i got rid of all the code.. excpet the reply button itself.
Link shortener with advanced, detailed statistics:

http://tyny.us/

#4 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 28 August 2006 - 07:12 AM

oops, i forgot.. i also had something liek this.. in my sendMessage.php

<input type="text" value="<? $_GET[$from]; ?>"

Link shortener with advanced, detailed statistics:

http://tyny.us/

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 August 2006 - 10:02 AM

You'll wnat echo $_GET[$from] otherwise nothing will be put in the value attribute of the input field so use:
<input type="text" value="<?php echo $_GET[$from]; ?>"





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users