Posts Tagged ‘php code’

How to use php code stored in mysql database?

I know how pull data from the database but I have stored within the a mysql field some text data. Within that that text I have put in some php variables. The problem is that when the browser renders the data that pulled from my sql, the variable stays as $user for example rather than changing to what I needed to. Is there any way to have the server process the php code stored within the mysql database?

How do I Create a Dynamic Menu using PHP?

I trying to design a "dynamic drop menu" for a website, using PHP.

The Code needs to work so that code for the menu is only written once.
Each ‘html’ page uses the menu refer-ed in PHP file.

I not sure how to do this, but I am assume that I will also need some CSS or Javascript to create the "dynamic drop menu".

Could someone possibly tell me how to go about this?
Provide some sample code or some links?

Any way to invoke a php script besides user clicking a button on a form?

The only way I know to run a php script is to put the name of the script in a <form action=""> tag. Are there any other options?

I have a situation where I would like to start a php script without relying on the user to press a button. I tried putting php code in a .html file, but when I load the file from the server it doesn’t execute any php.

Thanks,
Houyhnhnm

How to write HTML/PHP code for posting comments from customers?

I would like to know what is the HTML/PHP code to allow a person to post a comment on a website?
I am going to design a website with this ability the customers can post comments?

Can someone help me with a good example of using PHP to display a gif image?

I’ve found a number of different examples online, all with different approaches. Can someone share a simple example of php code that will display a gif image on the page? I *think* that the server I’m running on is using PHP4

(I’m still in the learning stage and have a long way to go.)

Thanks

How to compress a large photo with php file?

Hello,

I have a website that all what is doing is uploading images i just wonder if there is any way to upload 5mb file and compress it to like 200k without effect the quality of the picture and also to keep the same original size of the picture i know there is some php code that doing it but i am not sure how there is anyone can give me advice?

Thanks
tal

What JavaScript code do I use with PHP to show a file that was just uploaded onto the page?

I made a pretty basic PHP code to upload an image file (gif, jpeg, or pjpeg), and I can’t seem to find a JS code to show the newly uploaded picture on the page. I’m looking for a code that shows the uploaded picture itself, not just a certain picture each time you upload something.

So if someone could show me, that would be great, thanks.

What is the correct way to add multiple PHP snippets to the top of a file?

Below is what is at the top of my page. In this case I have 2 snippets at the very top of the page.
———————–
<?php
(code)
?>
<?php
(code)
?>

Is that the right way to do it? Should I take out the first "?>"?

How can I test my PHP code on my own computer?

I have a basic knowledge of coding PHP, but I don’t know how to test my pages without uploading it to the web server. I use SharePoint Designer, but I have DreamWeaver too. I need a step by step guide. Thanks.

what is a practical way to beautify tables when you are writing php websites?

For example, is there any advice for writing tables using php code, like attributes, or properties …. thanks in advance.