skip to Main Content

INSERT INTO MySql PHP

I am trying to add data into a MySql Database using PHP. The code: <?php session_start(); include('config.php'); if(isset($_POST['Submit'])) { $city = $_POST['city']; $from_station = $_POST['from_station']; $from_date = $_POST['from_date']; // Prepare and execute the SQL query $sql = "INSERT INTO journeys…

VIEW QUESTION

Php – Else statement always shown even thou I didn't do any activity

This is my code <form action="event_feed.php" method="POST"> <label for="title">Event Title:</label> <input type="text" name="title" id="title" required> <label for="description">Description:</label> <textarea name="description" id="description"></textarea> <label for="date">Date:</label> <input type="date" name="date" id="date" required> <label for="time">Time:</label> <input type="time" name="time" id="time" required> <label for="location">Location:</label> <input type="text" name="location" id="location"…

VIEW QUESTION

Mysql – PHP Uncaught ArgumentCountError

I am having some issues with my php code. The website is ...update.php?operation=pluseinsgast?variable=test and the following code: <?php error_reporting(E_ALL); ini_set('display_errors', 1); $connection = mysqli_connect("censored"); // Step 3: Determine the operation (increment or decrement) $operationa = explode("?", $_GET['operation']); // Assuming the…

VIEW QUESTION
Back To Top
Search