Trying to execute an external php file

Discussion in 'WordPress' started by cscott5288, Feb 12, 2010.

  1. #1
    OK so I am trying to run this code in my wordpress post:

    <div class="div_name">
    					<table height="200px">
    						<tr><td>
    							<form action="" method="post" name="f1">
    								<fieldset>
    									<legend>Blog Topic Generator</legend>
    									<label for="category">Category : </label>
    									<select name="category">
    										<option value="1">All</option>
    										<option value="3">Opinion</option>
    										<option value="4">Health</option>
    										<option value="5">Religion</option>
    										<option value="6">Science</option>
    										<option value="7">Art</option>
    										<option value="8">World</option>
    										<option value="9">Music</option>
    										<option value="10">Business</option>
    										<option value="11">Personal</option>
    										<option value="12">Technology</option>
    										<option value="13">People</option>
    										<option value="14">Recreation</option>
    									</select>
    									<input type="button" name="submit" value="Generate Topic"  onclick="JavaScript:xmlhttpPost('ajax.php');" />
    								</fieldset>
    							</form>
    							<br /><br /> 
    
    							<div id="phrase-result"></div>
    Code (markup):
    I am not a programmer so I am not sure if i am using PHP, Javascript or both? I have the external ajax.php placed in my root directory. I installed this plugin: http://wordpress.org/extend/plugins/exec-php/ which is supposed to allow me to execute php ... but I think it is only for inline php. How do i get my WP blog to execute the external JS that I have?

    Thanks ahead!
     
    cscott5288, Feb 12, 2010 IP
  2. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #2
    Hey,
    To include javascript you need to put something like this in between your head tags


    
    <script type="text/javascript" src="./js/jquery-1.2.6.min.js"></script>
    
    PHP:
     
    adbox, Feb 14, 2010 IP