Page 1 of 1

Please post your question here

Posted: 29 Apr 2018, 00:32
by Mr. MacKenty
Please post your question here :D

Re: Please post your question here

Posted: 05 Apr 2019, 07:40
by Can
Hello,
My question has to do with linking my database to my form. I wrote this code, but the value user_id isn't highlighted properly. Due to this the term VALUES is seen as text. That is what's stopping me from displaying data. Here is my code:

Code: Select all

$result = mysqli_query($connect, "INSERT INTO `events` 
(`title`, `event_text`, `event_start`, `event_end`, `event_time_start`, `event_time_end`, `event_date', `event_time`, `user_id`) VALUES
('$title', '$description', '$date1', '$date2', '$time1', '$time2', '$rdate', '$rtime', '$id_of_logged_in_user');");

Re: Please post your question here

Posted: 05 Apr 2019, 09:54
by Mr. MacKenty
It looks like you have a apostrophe instead of a back-tick after event_date.

event date should look like this:

Code: Select all

`event_date`
but right now it looks like this:

Code: Select all

`event_date'

Code: Select all

$result = mysqli_query($connect, "INSERT INTO `events` 
(`title`, `event_text`, `event_start`, `event_end`, `event_time_start`, `event_time_end`, `event_date', `event_time`, `user_id`) VALUES
('$title', '$description', '$date1', '$date2', '$time1', '$time2', '$rdate', '$rtime', '$id_of_logged_in_user');");

Re: Please post your question here

Posted: 05 Apr 2019, 10:08
by Jan12
I have a question about my index.php page linking to my beginner.php and advanced.php pages in my application. Those are the 2 pages that the user will get sent to when he fills in the information on the first page. I have the code done for those pages but I can't link those pages together. Do you think you could help me out? :)

Re: Please post your question here

Posted: 10 Apr 2019, 08:10
by Mr. MacKenty
In general when we link from one page to another, we want to use an a tag. A few examples and links are below:

Code: Select all

<a href="https://www.cnn.com">Click here to go to cnn.com</a>
A link with further information can be found by clicking here.