Php Echo or include problem? (PHP / AJAX)

Discussion in 'PHP' started by Neo_The_One, Jan 26, 2007.

  1. #1
    Hi,

    Im really a noob at php and dont know much myself i have been searhing for hours now and cannot find any solutions for my problem! I belive its an easy step but for those of us who dont know its hard!


    Well here is the code:
    <?
    require('/home/xxxx/public_html/inc_rate.php');
    getComments("1");
    submitComments("1","$PHP_SELF");
    ?>
    PHP:
    You see the 1 numbers, its to include the comment from the inc_rate.php file! Well i use a tutorial script and if i use the query below as you se i get the number written in html like example "22" or any other number!

    I neeed that number the "t_id" to show in the getComment("XXXXX");

    The XXX = t_id

    <? php if($mtutorial != false){ echo ($mtutorial['t_id']); } else { echo 'ERROR'; } ?>
    PHP:
    Well im interested in getting help with this, im willing to pay a small fee if needed! :) And if you can code this + a AJAX rating system with starts for me, we can make a package deal! :)

    Thanks! :) Hope somebody can help me out! :)
     
    Neo_The_One, Jan 26, 2007 IP
  2. moroswitie

    moroswitie Peon

    Messages:
    43
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi I think I can help you it sounds easy,
    but it isn't clear what you want do you have a instant messenger we coudl talk there
     
    moroswitie, Jan 26, 2007 IP
  3. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You probably want
    echo ($mtutorial[$t_id]);
    PHP:
    but to be completely honest I didn't understand your post very well...
     
    picouli, Jan 26, 2007 IP
  4. Neo_The_One

    Neo_The_One Active Member

    Messages:
    555
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Hi, guys! Yee i have msn arifagic (at) gmail.com

    Well i really am not into php so its kinda hard to explain! But i will try to agein!



    <?require('/home/xxxx/public_html/inc_rate.php');getComments("1");submitComments("1","$PHP_SELF");?>
    PHP:

    I need to include this file inc_rate.php useing this query

    <?require('/home/xxxx/public_html/inc_rate.php');getComments("1");submitComments("1","$PHP_SELF");?>
    PHP:
    But i need to change the
    getComments("1");
    submitComments("1","$PHP_SELF");


    But i need to change those two variables "1" and "1".

    To something like this:

    <?require('/home/xxxx/public_html/inc_rate.php');
    getComments("echo ($mtutorial[$t_id]);");
    submitComments("echo ($mtutorial[$t_id]);","$PHP_SELF");?>
    PHP:
    Well i dont know how to echo the T_id into the file... !
     
    Neo_The_One, Jan 26, 2007 IP
  5. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Uhm, I'm starting to understand a bit more... Very simply, you can do this:
    getComments($mtutorial[$t_id]);
    submitComments($mtutorial[$t_id],$PHP_SELF);
    
    PHP:
    and that's it!
     
    picouli, Jan 26, 2007 IP
  6. Neo_The_One

    Neo_The_One Active Member

    Messages:
    555
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Neo_The_One, Jan 26, 2007 IP
  7. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry but I don't understand the problem... Both the URLs you wrote seem to be working fine... Maybe you can show us a bit more code?
     
    picouli, Jan 26, 2007 IP