Skip to content
Advertisement

Tag: html

Inserting data into MySQL from a dropdown

I’m trying to make a dropdown list that allows users to select a training program that matches their needs, so when they select it, the option will go into a table in the MySQL database. This is my HTML form: What I need is an SQL query that will go with it, so when they select ‘Example option 3’, it

SQL – Remove all HTML tags in a string

In my dataset, I have a field which stores text marked up with HTML. The general format is as follows: <html><head></head><body><p>My text.</p></body></html> I could attempt to solve the problem by doing the following: However, this is not a strict rule as some of entries break W3C Standards and do not include <head> tags for example. Even worse, there could be

PHP fails to insert into Mysql (auto increment)

I have made my Mysql Table link this: That problem occurs because i am not able to insert auto_increment into my mysql query. index.php I post to it by a HTML form and it does executes the query but i get no rows in that table. I thnk its because of auto_increment or Unique or Primary. i was told to

Undefined index uid calling GET fetch

I have a function that calls a SQL query, the function is type fetch_user Now i get an Undefined Index error when I call my query, The error message is Undefined index: uid in profile.php on line 3 But the thing is that i cant find the error, This is my user.inc.php that have the function And this is my

Convert a SQL query result table to an HTML table for email

I am running a SQL query that returns a table of results. I want to send the table in an email using dbo.sp_send_dbMail. Is there a straightforward way within SQL to turn a table into an HTML table? Currently, I’m manually constructing it using COALESCE and putting the results into a varchar that I use as the emailBody. Is there

How to convert last insert id into string?

I have a create account page and on the page I have one button to insert all the details into two seperate tables one of the tables Pictures is dependant on the User table 1:1 relationship via UserID. I have written some code to try get the last insert id so I can insert into the pictures table: Not sure

Advertisement