Skip to content
Advertisement

Tag: html

PHP, WordWrap how to cut only text and don’t cut html code

i have a problem. I have to use the wordwrap function to not go too far with the text in a table. I inserted wordwrap and it worked fine but now that I also have to insert some html code I have a problem. The wordwrap function cuts my html code (for example span cuts it to me in sp

How Can I Identify Which Linked Was Clicked With PHP?

I have connected to my database with PHP and selected a bunch of names with a query. Each name has an id value. I created a while loop that loops through the results and outputs something like this: (id only displayed for explanation purposes) At the linked page I want to run a query like SELECT * FROM database.table WHERE

PHP not executing a shell exec command

To keep this simple this code works: And this code code doesn’t: Does anyone know how I can get the code that doesn’t work to work? I have ran the command in a normal terminal and they execute as expected, but when ran with PHP it cause a server 500 error – this seems to require a PHP code review

PHP form validation not functioning having copied the tutorial code

I am hoping the community can give me a little insight into what is not working with my code, I am following a Udemy course. I have followed the accompanying video which developed an undefined variable error, which after doing some research I believe I have fixed by declaring variables as empty strings being able to be over-ridden by the

Using JS variable as the property of HTML input Form

I have a form which have two field “optin” and “Qty”.The quantity field of the form accept the number.The minimum number which can be entered in this field(QTY) depends upon the the value of the Option field i.e. If the option fiels value is red then the minimum value propert of the Qty field should be 5 and if it

Randomly Show an HTML Snippet From List With PHP

As the title implies, I have a few different lines of HTML code (Example Below), and I would like the server to randomly select one and show it when the page loads. I have these three HTML snippets, and I want one to randomly show when the page is loaded. I found this example using the PHP array function, but

Advertisement