Skip to content
Advertisement

Tag: html

PHP login session not coming through (Login with SQL database)

The latest little ‘challenge’ I’ve made for myself is trying to code a good login screen on a site I’m making for some friends. However, when I input my email and password as they are displayed in my SQL database, the file I use to check it with does not send out anything at all. My code looks as follows:

How do you prevent tags from displaying in textarea?

I am saving this string into my sql db: This displays fine in a table: But when I display it in a textarea it shows up like this: How can I get the textarea to keep the formatting but not show the <br> tags. Answer You would want to strip out the <br> tags and the extra space. Here’s a

How to merge two array if one item exist in both array?

I want to expand my city array with post code value. If the city_postcode array contain city array name record then push postcode value into city array. That’s what i want to achive somehow. city array: city_postcode array: The result I want: Answer If you can rely on the cities and post codes to be equal in length and sorted,

How to display T-SQL in html with proper formatting?

I’m sure this has to be a duplicate, but I guess my searching skills aren’t on point today. I want to display SQL code in html (like in blogs and such), and I want it to be formatted like you would see it in Management Studio or any other editor that supports SQL. I’ve found a nuget package that does

Array to string with Django and MySQL

I need to design SQL query in html on Django I have an array in my table like : When I call this array in my page : I have : [‘aa’, ‘bb’, ‘cc’] What do I do if I want : a b c I tried with .split(‘,’) but I’ve already ‘[]’ I tried with for item in list

React Form won’t save date

I’ve created a basic form in React to save a name, category, and date if available to an SQL table. My form is acting fine – it’s submitting correctly and saving the new entries. The problem is, while it saves the name and the category fine, if you choose a date (using the HTML date picker) the date isn’t getting

Javascript won’t work properly with my form

So I am currently doing a project for our class, in which I have to display something that I previously stored in a database on a separate page. I chose to display every dataset, as it is the easiest to do. With PHP I implemented a foreach loop which is supposed to show each dataset with a button “EDIT” underneath

SQL – Get multiple values when limit 1

If I have a table like this: And use this query: SELECT ident,COUNT(*) FROM sales WHERE status=? AND team=? AND DATE(date) = DATE(NOW() – INTERVAL 1 DAY) GROUP BY ident order by COUNT(*) DESC LIMIT 1 I get the value: cucu1, since that has the most rows. But if my table is like this: It should return both cucu1 and

Delete a users data from SQL using PHP

Hi im trying to delete a users booking detials when the user clicks delete in my bookingbeforedeltion.php file but for some reason when I test my php file once I click delete it goes to my delete.php screen and says it failed to delete from database and has the error Undefined index: rn. Is my rn not defined? Sorry Im

Advertisement