Please post your question here

Designing Solutions Through Programming. This course is also called introduction to programming.
Forum rules
Please be careful about sharing personal information. Never use any identifiable information.
Post Reply
User avatar
Mr. MacKenty
Site Admin
Posts: 119
Joined: 28 Apr 2018, 17:06
Answers: 3

Please post your question here

Post by Mr. MacKenty » 29 Apr 2018, 00:32

Please post your question here :D
0 x

User avatar
Can
New User
Posts: 2
Joined: 23 Aug 2018, 15:22

Re: Please post your question here

Post by Can » 05 Apr 2019, 07:40

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');");
1 x

User avatar
Mr. MacKenty
Site Admin
Posts: 119
Joined: 28 Apr 2018, 17:06
Answers: 3

Re: Please post your question here

Post by Mr. MacKenty » 05 Apr 2019, 09:54

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');");
0 x

User avatar
Jan12
New User
Posts: 2
Joined: 23 Aug 2018, 11:50

Re: Please post your question here

Post by Jan12 » 05 Apr 2019, 10:08

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? :)
1 x

User avatar
Mr. MacKenty
Site Admin
Posts: 119
Joined: 28 Apr 2018, 17:06
Answers: 3

Re: Please post your question here

Post by Mr. MacKenty » 10 Apr 2019, 08:10

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.
0 x

Post Reply