PHP Questions & Answers Thread

MaD-DoC

Member
Oct 27, 2007
6,337
22
0
SLIIT/Malabe
rapa said:
<form id="form1" name="form1" method="post" action="index.php?action=sendclpm&sid=<?php echo $sid; ?>">
<input type="text" name="clid" id="clid" value="<?php echo $clid; ?>" />
<input type="text" name="pmtext" id="pmtext" value="<?php echo $pmtext; ?>" />
<input name="" type="submit" value="SEND" />
</form>

thankz bro....................
 

MaD-DoC

Member
Oct 27, 2007
6,337
22
0
SLIIT/Malabe
sri_lion said:
Me thiyenne HTML embedded in PHP ne machang! (Umbage Question eka tikak clear madi)

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<anchor>SEND<go href=\"index.php?action=sendclpm&sid=$sid\" method=\"post\"></anchor>
<postfield name=\"clid\" value=\"$clid\"/>
<postfield name=\"pmtext\" value=\"$(pmtext)\"/>
</go><br/>
</head>


machan anchor xhml wala wada na.oya thiyenne wml code ekak wap site ekaka.
 

ahamednishadh

Active member
  • Sep 17, 2006
    4,896
    8
    38
    34
    Sri Lanka => Colombo => Colombo 06
    QUESTION IN PHP!

    I NEED TO KNOW HOW TO CONNECT TWO PAGES.
    WAT I MEAN IS IM GOING TO HAVE A COPY OF DA SAME PAGE IN SEVERAL DIFFERENT SERVERS,K! I WANT TO UPDATE THEM AT DA SAME TIME WITHOUT LOGIN IN TO ALL DA SERVERS AND CHANGEING THEM ONE AT A TIME.

    ITS LYK DIS!.
    I HAVE A PHP SCRIPT WHICH IS IN ONE SERVER AND HAS DA VARIABLES AND ALL. I WANT DA PAGES THAT R IN DA OTHER SERVERS TO BE CONNECTED TO THIS SCRIPT LYK WEN I UPDATE DA VARIABLE WITH A DIFFERENT VALUE DA PAGES WEN REFRESHED NEXT TIME SHOULD SHOW DA UPDATED VALUE. ITS LYK A CSS PAGE OR A EXTERNAL JAVASCRIPT PAGE WHICH IS CONNECTED TO DA HTML PAGE. SUMTHING LYK DAT. AN EXTERNAL PHP SCRIPT DAT IS CONNECTED TO PAGES IN OTHER SERVERS.

    I KNOW HOW TO MAKE VARIABLES IN PHP. SO CAN U JST TELL ME HOW TO MAKE A EXTERNAL PHP SCRIPT AND GET IT CONNECTED TO DA OTHER PAGES AND ALSO AFTER CONNECTING IT HOW TO I CALL DA VARIABLES??

    THANKS IN ADVANCE!!!

    ok!! thanks to all who wanted to help me in da above question. i googled for it and found it after much trouble. n e way nw ive got a different problem. it is dat nw wen i connect a variable to my page from my external php script i get da value of da vaiable with sum text such as this  . every place i put my variable(different variables) i get da value displayed with this string.
    below is my code i used to connect my page wit my external script

    Code:
    <?php
    				        include ("123456.php");
    					echo $myvariable;
    					?>

    pls help me in this!!!
     
    Last edited:

    sri_lion

    Member
    Sep 14, 2006
    12,908
    102
    0
    Kuala Lumpur
    ahamednishadh said:
    ok!! thanks to all who wanted to help me in da above question. i googled for it and found it after much trouble. n e way nw ive got a different problem. it is dat nw wen i connect a variable to my page from my external php script i get da value of da vaiable with sum text such as this  . every place i put my variable(different variables) i get da value displayed with this string.
    below is my code i used to connect my page wit my external script

    Code:
    <?php
    				        include ("123456.php");
    					echo $myvariable;
    					?>

    pls help me in this!!!

    Can you post your
    Code:
    123456.php
    code too?
     

    ahamednishadh

    Active member
  • Sep 17, 2006
    4,896
    8
    38
    34
    Sri Lanka => Colombo => Colombo 06
    re

    sri_lion said:
    Can you post your
    Code:
    123456.php
    code too?

    i just noticed dat even if i put da code
    Code:
    <?php
    				        include ("123456.php");
    					?>
    inside da <head> tags of my html side of da page i get it on top of da whole page. da string  is shown in da top of da page. if i put it in another place it changes its place to place where i put da code!
     

    sri_lion

    Member
    Sep 14, 2006
    12,908
    102
    0
    Kuala Lumpur
    ahamednishadh said:
    i just noticed dat even if i put da code
    Code:
    <?php
    				        include ("123456.php");
    					?>
    inside da <head> tags of my html side of da page i get it on top of da whole page. da string  is shown in da top of da page. if i put it in another place it changes its place to place where i put da code!

    Try..

    Code:
    $myvariable = "500";

    or

    Code:
    $myvariable == "500";
     

    sri_lion

    Member
    Sep 14, 2006
    12,908
    102
    0
    Kuala Lumpur
    ahamednishadh said:
    da thing is dat where ever in da page i give da script to include da external script it prints this string.

    its not da da place where i give da script to retrive da variable.

    What exactly the answer you hoping to get?

    In your external page remove the
    Code:
    <html>
    tags and see!

    Like this..

    Code:
    <?
    
    $myvariable=500;
    $myvariable2=20;
    
    ?>

    and save as .php file and try again!
     

    sri_lion

    Member
    Sep 14, 2006
    12,908
    102
    0
    Kuala Lumpur
    try

    Code:
    include '123456.php';

    or

    Code:
    include "123456.php";

    without the brackets!

    You can also try with "require_once" instead of "include"
     
    Last edited:

    RVG

    Member
    Jan 29, 2007
    1,008
    0
    0
    me blackiyo ara poster competition ekata mokada une?? aparade mama haduvath ekka poster ekak
     

    samiram

    Member
    Sep 3, 2006
    9,768
    2
    0
    ahamednishadh said:
    ok!! thanks to all who wanted to help me in da above question. i googled for it and found it after much trouble. n e way nw ive got a different problem. it is dat nw wen i connect a variable to my page from my external php script i get da value of da vaiable with sum text such as this  . every place i put my variable(different variables) i get da value displayed with this string.
    below is my code i used to connect my page wit my external script

    Code:
    <?php
    				        include ("123456.php");
    					echo $myvariable;
    					?>

    pls help me in this!!!

    hmm..
    seems to me like you edit your files with notepad or...
    text editor that wont support UTF8 file encoding..
    use a editor such as phpcoder to do the coding..
    never ever use notepad to edit php files..
    :)
     

    samiram

    Member
    Sep 3, 2006
    9,768
    2
    0
    ahamednishadh said:
    da thing is dat where ever in da page i give da script to include da external script it prints this string.

    its not da da place where i give da script to retrive da variable.

    edit your script in phpcoder...
    and remove that  from it..
    and save it again and run..
    it should work now..
    :)
     

    Djpata

    Member
    Jun 26, 2006
    9,540
    23
    0
    ahamednishadh>>>

    do you want to call a php script wich is not in ur web page? but u want to call an external script to ur page and pass it through? am i ryt? im bit confused about ur question....cz i looked abt sri lion's answers bt nything din work for u ne??:confused::confused: