Esempio n. 1
0
<td align="right"><strong>Image :</strong></td>
<td align="left"><input id="imgid" type="text" name="image" value="<?php echo $thing->getImageValue(); ?>" /></td>
</tr>
<tr align="center">
<td align="right"><strong>URL:</strong></td>
<td align="left"><input id="URLID" type="text" name="url" value="<?php echo $thing->getUrlValue(); ?>" /></td>
</tr>
<tr align="center">
<td align="right"><strong>About:</strong></td>
<td align="left"><input id="AboutID" type="text" name="about" value="<?php echo $thing->getaboutValue(); ?>" /></td>
</tr>
<tr align="center">
<td align="right"><strong>Author:</strong></td>
<td align="left"><input id="AuthorID" type="text" name="author" value="<?php echo $thing->getauthorValue(); ?>"/></td>
</tr>
<tr align="center">
<td align="right"><strong>Ingredients:</strong></td>
<td align="left"><input id="ingrenID" type="text" name="ingredients" value="<?php echo $thing->getingredientsValue(); ?>"/></td>
</tr>
<tr align="center">
<td align="right"><strong>Instructions:</strong></td>
<td align="left"><input id="instructID" type="text" name="instructions" value="<?php echo $thing->getinstructionsValue(); ?>" /></td>
</tr>
<tr align="left" >
    <td colspan="2" align="center"><input type="submit" name="Check" title="Check" onclick="<?php  $thing->RemoveRecipework($_GET["value"]);?>" value="Delete"/><h4><a href='index.php'>Home</a></h4></td>
</tr>
</table>
</div>
</body>
</form>
</html>
Esempio n. 2
0
                $array = $dal->findone(array('_id' => new MongoId($_GET['id'])));

                echo "<script>
                $(document).ready(function(){
                document.getElementById('name').value = '{$array['name']}';
                document.getElementById('description').value = '{$array['description']}';
                document.getElementById('image').value = '{$array['image']}';
                document.getElementById('about').value = '{$array['about']}';
                document.getElementById('author').value = '{$array['author']}';
                document.getElementById('url').value = '{$array['url']}';
                document.getElementById('ingredients').value = '{$array['ingredients']}';
                document.getElementById('instructions').value = '{$array['instructions']}';
                });
                </script>";
            }


            if (empty($_POST["name"]) && empty($_POST["description"]) && empty($_POST["image"]) && empty($_POST["name"])) {
                echo 'Please Enter Recipe Information.';
            } else {
                $thing = new Recipe();
                echo $thing->RemoveRecipework($_GET['id']);
                echo 'Recipe Deleted Successfully.';
            }
            ?>
<input type="hidden" id="recordId" name="recordId" value="<?php echo $_GET['id'] ?>"/>
</form>
</body>
</html>