0
votes
1answer
18 views

php register user type

Hi i try to make a 2 register form. First register form for normal user and second register page is for business user. I am using one mysql table for users. this table for same like normaluser and ...
0
votes
3answers
34 views

PHP help for the beginner

I am very green to php and I am trying to create code that will allow me to enter information to a database I constructed. Everytime I run it though I get an object not found error 404. I have ...
0
votes
2answers
21 views

MySQL Cant connect.. details correct

Forgive me if this is a dumb question but this is really frustrating. Im having issues trying to connect to my MySQL database. The details are correct as i can login via phpmyadmin and terminal, the ...
0
votes
1answer
22 views

How to display random image and text from MySQL Database with PHP

I'm trying to make this html page (display.html) display a random image submission and random text submission from my MySQL table labeled "submissions". This is the current code for display.html: ...
1
vote
1answer
41 views

PHP connect to mysql database

I'm trying to make a connection between my database and the login form that I'm using in my website, but I'm facing a problem with that, so every time I click on login, this message appears "No ...
-5
votes
0answers
21 views

Undefined variable, and parameters null [duplicate]

My guestbook is telling me that some parameters are null instead of 1, and some variables are still undefined. I had it working for a time and I don't know what happened. ( ! ) Notice: Undefined ...
-1
votes
4answers
61 views

undefined variable in php

Hi i'm new to php and I keep getting an error in my guestbook saying ( ! ) Notice: Undefined variable: errors Call Stack # Time Memory Function Location 1 0.0156 154584 {main}( ) ...
-4
votes
0answers
41 views

database php like button

I have since made an attempt to create a " Likes " button to my forum , including its " posts " . right now I have three different issues I need some help solving . Problem number 1 : after I press ...
0
votes
1answer
24 views

message delivered confirmation in php

i am making a php website for my semester project ...and i have a contact us page in which user send me a message and the message is stored in database . but i want that when user type the message and ...
1
vote
1answer
28 views

What is the Best MySQL Database Formatting Type for GPS Coordinates?

I have a script which is inserting latitude and longitude into the MySQL database. I have assigned these rows as: `gpslat` DECIMAL(11,4) NOT NULL , `gpslong` DECIMAL(11,4) NOT NULL , For some ...
-1
votes
2answers
68 views

Upvote/Downvote based forums and user profiles [on hold]

I am in the early stages of developing a website and I became curious as to how an upvote/downvote code works, similar to that of reddit and stack over flow. What is the code usually written in? Im ...
-1
votes
0answers
36 views

PHP/MySQL/HTML Add Error?

i have files nilai-tambah.php , nilai-edit.php 1.nilai-tambah.php <?php //nilai-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ...
0
votes
2answers
28 views

Proper way to require file that requires db connection

I don't use php very often and was wondering if someone could answer this question for me. I have a folder structure like so: -pages/rightCol.php -pages/privacyPolicy.php index.php In my index ...
0
votes
1answer
31 views

PHP/MySQL/HTML Add user Error?

i have file siswa-tambah.php <?php //siswa-tambah.php //periksa apakah username = kosong dan hak akses = adm if(empty($_SESSION['username']) OR ($_SESSION['akses']<>'adm')){ //jika ...
-2
votes
2answers
34 views

MYsql and php best saving in database [on hold]

I have created a forum and created a "like" button, almost similar to that facebook has. when a user presses this button, give it a likes to record in the database, which will be shown Beside this ...
0
votes
2answers
43 views

How to add a column entry in an already existing MYSQL database table?

I have a html page with a text field for email. When I enter an email ID I store it in the database. The database has 3 fields namely 'serial_no','coupon_code','email'. I already have 100 odd coupon ...
0
votes
3answers
33 views

database error help, debugging

<?php include('DBconnect.php'); if(isset($_POST['submit'])) { $password=trim($_POST['password']); $password2=trim($_POST['password2']); if($password==true && $password1==true) ...
0
votes
5answers
63 views

How to make db table field dynamic

i am creating plugin in wordpress for contact us form and in that i am creating fields(textbox,textarea etc...) dynamically based on my requirement. so there is no fixed number of fields. i am storing ...
0
votes
1answer
30 views

Live search function, how to make result to the input box

if (strlen($search_string) >= 1 && $search_string !== ' ') { // Build Query $query = 'SELECT * FROM User WHERE email LIKE "%'.$search_string.'%"'; // Do Search $result = ...
0
votes
2answers
34 views

MySQL insert data from other table

This question is similar to my previous question except this is INSERT instead of update I have two tables: contacts and companies. contacts has : id, group_id, company_id, email, company companies ...
0
votes
1answer
30 views

Database solution for a medical laboratory website? [on hold]

I'm a beginner web developer trying to build my portfolio by doing my father's website (he owns a medical laboratory). Such sites have a test catalog (as in medical tests that can be ordered) and ...
0
votes
1answer
39 views

Data retrieving is not working

In my codeigniter project, when the login button is clicked, it's not redirecting to the user home page. But for my client, it is working well. When I use the print_r($query) it displays the ...
0
votes
2answers
18 views

CDBconnection in yii framework

I tried this to create a database connection but it didn't go well , try { $connection=new CDbConnection(); $connection->active=true; ...
0
votes
1answer
30 views

Using Laravel schema builder and migrations

I am new to Laravel PHP framework. I am confuse with how Laravel schema builder and migrations works. I created a two tables using Laravel migrations. Below are my Two tables: public function up() ...
-2
votes
1answer
43 views

Login php if else condition for 2 database table

Hi everyone i think this is good question for everone. I am try to make a login page. But i have one problem. I have 2 users table in my database . First users table is for normal user and second ...
0
votes
1answer
25 views

PHP MySQL using isset($_GET)

Hello, I have my php script using this code: $start = (isset($_GET['start']) ? (int)$_GET['start'] : 0); $result = mysqli_query($con,"SELECT * FROM menuitem LIMIT $start, 4"); This pulls in the ...
2
votes
2answers
45 views

How can I display data from the same table side by side

Say I have 1 table in mysql (called get) like this: ID S Num 00 1 506 00 2 620 01 1 562 01 2 564 02 1 548 02 2 484 03 1 488 03 2 895 I am trying to get it in this format: ID S1 S2 00 506 620 01 ...
0
votes
2answers
27 views

MySQL: Update column items using the same webpage

I currently have a table in my database that has dozens of items. The PHP page I have now, labeled firstpage.php only displays 4 items from my database at a time, using LIMIT 4. I want to use the same ...
0
votes
1answer
20 views

How to store complex product/order data in MySQL?

I'm working on an order system for my online shop. I have 2 tables: products, storing info about products orders, storing general id's & infos of customer orders. Now I want to have a way to ...
0
votes
1answer
55 views

MySQL query too long

Is it possible that a MySQL query could be too long and causes some problems? I want to save into a database the browser_version and platform and user_agent, etc., from a user. I use this PHP class ...
-1
votes
1answer
22 views

Prevent duplicates being added to database table via PHP form

I want to log what a user enters into a PHP form, and make sure they are not entering data that already exists in a database table. I have the code already that enters the data into the table from ...
0
votes
1answer
24 views

How to manage use content on website

so I have recently gained some interest in how websites work. I am trying to learn how websites such as facebook and twitter manage their user contents. I have tried looking on google but my lack of ...
-1
votes
3answers
32 views

Show specific row php

I am a terrible php noob and I have a question about reading out specific data from my table. I have this table set up with a few data fields. +----+-------------+-------+ | id | description | img ...
-4
votes
2answers
40 views

One to Many SQL Query

I am new to sql. Have been programing for a while but have always found a way not to use databases. I know stupid. I have a questions about One to Many sql queries. I am building a website so i can ...
0
votes
2answers
17 views

PHP: Database Connection Boilerplate Code

In nearly every script/function I use that involves operating on the database, I use this code: $conn = connect(); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ...
-1
votes
0answers
27 views

how to get the value am not get the Value in Php oops

I want to get the value from Latest.php inside Index.php and display it, but I'm not getting the values. Could anyone help me fix this? I've tried my best but I couldn't get the result. Index.php ...
1
vote
0answers
48 views

Adding 1000 names to MySQL database

I'm having this issue where I have 1000 users which I need assign to them their unique 'ID', 'username/renum' and 'password' (md5 hash). I need to create table with VALUES for id, category, name, ...
-2
votes
2answers
34 views

Mysql error in syntax near 'Amritsar')'

What is this error? Does anyone know ? When I post in localhost this error will come. What is this error where is the problem in my code? You have an error in your SQL syntax; check the manual ...
0
votes
2answers
47 views

Repeat email for registiration form in php

how can i add repead function in this code for email repead ? I have check function for email is alredy exist in database, but i want to againemail function for email re-enter. How can i do this in ...
0
votes
4answers
51 views

username and login through mysql database

I have a username/database that i wanna log into via PHP in the back end - so i created 2 files - one called login.php and the latter called process.php - here's the code for them both - login.php: ...
0
votes
1answer
14 views

Saving a picture path in MySQL database, and then pulling that data to display picture?

I have a MySQL database where I have a table ITEMS and column PICTUREPATH. The Picture path lists "localhost/firstimage.jpg" and so on. In my PHP script, I've added some code to what I thought would ...
-2
votes
3answers
49 views

How to write database errors to a text file PHP [on hold]

ok this is probably pretty simple but for some reason I can't do it. I have an insert statement and once the query is executed the die() response shows to the users. I truly don't want that response ...
1
vote
2answers
58 views

How do I display random text and image from PHP form on refresh?

I'm a fairly new programmer and I'm currently working on creating a program for a web-based art exhibit that would will display a random image and text using data from a PHP form which requires inputs ...
0
votes
2answers
42 views

PHP and MySQL select box

I create registration form for my website but I have one problem. I created a database for city, country, state and business_category. This code working only country other was not working why? ...
1
vote
2answers
39 views

MySQL update table from other table

I have two tables: contacts and companies. contacts has : id, group_id, company_id, email, company companies has: id, group_id, name At the moment, contacts.group_id value is 0 (recently added the ...
0
votes
0answers
26 views

MySQL & PHP: Using an INPUT BUTTON to redirect to new page of data

I have some code within my php script that connects to my database, and then displays a list of food items. It works pretty well, but now I need to create a button that links to another page for each ...
2
votes
1answer
34 views

Total of an array using only top 3 values

With help from a fellow member I have been able to add together the values of an array called by a MySQL query. However, the code I have is adding up all values. $top_1st = ...
0
votes
2answers
39 views

Check that data in a SQL table already exists

I want to log what a user enters into a PHP form, and make sure they are not entering data that already exists in a database table. I have the code already that enters the data into the table from ...
0
votes
1answer
29 views

Flex 1056: “Cannot create property” — but the property already exists in datatable

I'm following a flex application tutorial, and while I've been able to fix most of my errors, this one has me completely stumped. I have a datatable called employees, with these columns: id, ...
0
votes
2answers
32 views

PDO does not insert after quote

I am trying to avoid SQL injection in my page. // Connect to database server and select database $connection = new PDO("mysql:dbname=tt8888;host=mysql.tt8888.com", "tt8888", "ttnopassword"); // Quote ...

15 30 50 per page