Click here to Skip to main content
16,020,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this form page :

XML
<?php $this->load->helper('url'); ?>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/BL_ITCL/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/BL_ITCL/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/BL_ITCL/css/bootstrap-theme.css">
    <link rel="stylesheet" type="text/css" href="http://127.0.0.1/BL_ITCL/css/bootstrap-theme.min.css">
    <title>Confirm Page</title>
</head>
<body style="background-color:#F63;padding-left:443px;padding-top:127px;width:100%" >
        <div>
            <form action="http://127.0.0.1/BL_ITCL/index.php/Get_Request/request" method="post">
                    <textarea  name="Request" id="Request" rows="15" cols="50" style="visibility: hidden;">

                       <?xml version="1.0" encoding="ISO-8859-1"?>
                            <data>
                              <game id="103478">
                                <opponent>Peter</opponent>
                                <oppid>4</oppid>
                                <lastdraw>0</lastdraw>
                              </game>
                              <game id="103479">
                                <opponent>Peter</opponent>
                                <oppid>4</oppid>
                                <lastdraw>2</lastdraw>
                              </game>
                              <game id="103483">
                                <opponent>James</opponent>
                                <oppid>47</oppid>
                                <lastdraw>2</lastdraw>
                              </game>
                            </data>

                    </textarea>
                <br/>
                   <input type="submit" name="confirm"  value="Confirm" class="btn btn-success btn-lg">
            </form>
        </div>
</body>
</html>



another file i want to load xml and parse
PHP
$p=xml
 $p=simplexml_load_file($this->input->post('Request'));
echo $p->data[0]->opponent;
// creates error

plz help any body
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900