I found a tutorial on w3schools teaching the logic on the php/ajax database concept. Following this tutorial, enabled what I wanted to work.
The issue now is that the second query will only display one entry from my 4th table. Once I select a company from the select drop down menu, the code...
All,
I have a web form that's using php to self submit. I want to use sql statements to pull in data from three different tables to create something that I call a "profile" to be entered into a fourth table called "profile".
I am able to use three tables successfully but when I would try to...
All:
I have setup the sample for the autofill drop down & xajax from this post: http://www.tek-tips.com/viewthread.cfm?qid=1466795.
This works fine without the need for database values. I can't generate values in any of the select boxes from the db table 'vehicles' that I created.
This is...
Should the database `vehicles` look like this?
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI |...
Jedel,
If I'm understanding this correctly, if I set the database field type as BOOL, the field would only accept a value of true/false or 0/1.
If this is the case, then this change will not work for what I need. Because I need to be able to add multiple values to this one field.
Currently I...
Issue resolved with the error message. Found out that the problem was with the data in the table.
The code could not read the value "Array".
I manually changed the value in the table to the desired value and it removed the error message.
I am getting better. That's cool. Now I am really a...
All:
Code works but don't know why I am receiving this message:
"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\pcl\list_contacts.php on line 109"
No clue.
$events = explode(", ",$eventid);
$eventlist = "";
foreach($events as...
All:
I need to display checkbox values on my edit page, but what I have now displays all checkboxes checked, instead of reading the checkbox values saved in my database table.
Here's the code.
<div class="row">
<label>Event(s):</label>
<?php
while ($event =...
Big Thank You!!! Have I ever told you, your awesome?
This worked. But I can't figure out how to remove the extra comma on the end of the result.
Here's the code.
while ($sql1 = mysql_fetch_array($sql)) {
$id = $sql1['id'];
$companyName = htmlspecialchars($sql1['company_companyName'])...
All:
I have one big mess that I don't know how to describe well but here it goes. I am having trouble displaying array data.
I have a record with the column name "eventid" filled with comma separated values. I need every array value matched with another table that has its name.
*NOTE: An id...
All:
This is what I want to happen:
1. When a user would fill out this form, they would first have to choose a company from a select menu preloaded with values.
2. Once the user has made a selection, somehow the form is generated with values from another table in the database based upon this...
All - I found this code from another forum and it works with MYSQL and PHP.
Could someone help with the conversion of this code for usage in PHP and MS ACCESS?
Thanks.
MYSQL QUERY TO GET ALL AVAILABLE OPTIONS
mysql_select_db($database_siteConn, $siteConn);
$query_rsGetfeatures = "SELECT...
Ok. Now what's wrong?
The Select box will not load any data from my database table.
Why?
<?php
function getOptions('tblMinorGroup', 'ID', 'minorGroupName', 'minorGroup');{
global $conn; //the connection handle
$id = $_GET['ID'];
$minorGroupName = $_GET['minorGroupName'];
if...
Could someone tell me what's wrong with this.
What I am trying to do is select a chosen value from the database and also have the option to change the selection?
Here's the code.
<?php
include("includes/connection.php");
$id = $_GET['id'];
$sql="SELECT * FROM tblCompanies WHERE id=$id"...
Thank you jpadie!
This is what worked for me
<?php
// Redirect browser
header("location:http://localhost/profiles/list_companies-test.php");
include("includes/connection.php");
$id = $_GET[id];
$query[] = "INSERT INTO tblCompanies1 (companyName, corpAddress1, corpAddress2, city...
I'm thinking that I am not properly concatenating the two strings.
This is what I have so far:
<?php
// Redirect browser
header("location:http://localhost/profiles/list_companies-test.php");
include("includes/connection.php");
$id = $_GET[id];
$query1 = "INSERT into tblCompanies1...
Hate to be a pain but this is what I got.
The form name is the same as the valuefield name.
<?php
// create database connection
include("includes/connection.php");
$id = $_GET['id'];
$query = "UPDATE tblCompanies SET minorGroup = '" . $_GET['minorGroup'] . "' WHERE id = $id"; // Get lists of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.