Jump to content

Nesting Issue (I Think)


krisw44

Recommended Posts

Ok, so I have a site that I am building, with a content manager. In the content manager i am putting some php code to display in the page.

 

Here is the holder for the page content:

<div id="contentholder" class="yesprint">
<div id="innercontent">
<?php echo $row['content']; ?>
</div>
</div>

 

Here is the code that is getting loaded as $row['content']:

<form name="qform" id="qform">
<input type="text" name="p19q2" value="<?php echo $valarr['p19q2']; ?>"/><br/>
<input type="text" name="p19q3" value="<?php echo $valarr['p19q3']; ?>"/><br/>
<input type="text" name="p19q4" value="<?php echo $valarr['p19q4']; ?>"/><br/>
<input type="radio" name="p19q5" value="123" <?php if($valarr['p19q5'] == '123'){ echo 'checked="checked"'; } ?>/>123 <input type="radio" name="p19q5" value="456" <?php if($valarr['p19q5'] == '456'){ echo 'checked="checked"'; } ?>/>456<br/>
<input type="text" name="p19q6" value="<?php echo $valarr['p19q6']; ?>"/><br/>
<textarea type="textarea" cols="30" name="p19q7" rows="7"><?php echo $valarr['p19q7']; ?></textarea><br/>
</form>
<button type="button" onclick="saveXML()">Save</button>

 

 

It is currently showing the php code in the value tags as the value for each input, instead of processing the php. If I copy the source code and run it alone it works fine though. Here is the combined source snippet:

<div id="contentholder" class="yesprint">
<div id="innercontent">
<form name="qform" id="qform">
 <input type="text" name="p19q2" value="<?php echo $valarr['p19q2']; ?>"/><br/>
 <input type="text" name="p19q3" value="<?php echo $valarr['p19q3']; ?>"/><br/>
 <input type="text" name="p19q4" value="<?php echo $valarr['p19q4']; ?>"/><br/>
 <input type="radio" name="p19q5" value="123" <?php if($valarr['p19q5'] == '123'){ echo 'checked="checked"'; } ?>/>123
    <input type="radio" name="p19q5" value="456" <?php if($valarr['p19q5'] == '456'){ echo 'checked="checked"'; } ?>/>456<br/>
 <input type="text" name="p19q6" value="<?php echo $valarr['p19q6']; ?>"/><br/>
 <textarea type="textarea" cols="30" name="p19q7" rows="7"><?php echo $valarr['p19q7']; ?></textarea><br/>
</form>
<button type="button" onclick="saveXML()">Save</button>
</div>
</div>

 

 

Any thoughts or suggestions on this would be much appreciated.

Link to comment
Share on other sites

Is the file format being interpreted by PHP?

 

IE: if the file extension is .html it *might* not be process by PHP thus resulting in your problem. (depends on server configuration.) Make sure the file ends in .php maybe?

 

EDIT: I might have read your problem wrong Jessica might be right.

Edited by DarkerAngel
Link to comment
Share on other sites

Jessica: I understand the issues with it, but not sure how else to retrieve and load the data without having to manually build each page.

 

DarkerAngel: Yes, the main page is a .php page. It process all of the main php requests properly, just not the ones being called within the second level.

 

ManiacDan: I'll take a look at those snippets.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.