0
votes
0answers
3 views
Prepared statement not populating DB
I'm trying to make my first prepared statement work, but so far I'm unsuccesful. I hope you're able to help me out. I have an index.html with a simple form that parses it's data to insert.php. ...
0
votes
0answers
3 views
button click + swf player + database IP radio list
how can I make this work: I have a swf player and I get the IP and the port of a radio station list in my database using PHP. The player plays the right station after a SELECT FROM db. But this is not ...
0
votes
1answer
15 views
Efficient query to just return row count
I have five different queries running on my about page showing basic data like the number of news stories we have on the site. I am using queries like this:
$sql4 = "SELECT `ride_id` FROM `tpf_rides` ...
0
votes
5answers
22 views
stop inserting data in the database when refreshing the page
I am looking for a way to stop inserting or sending data in the database when refreshing the page.
here is my code:
user_details_page.php
<form action="confirm_page.php" method="post" >
User ...
-4
votes
0answers
19 views
Upgrade DB connection class security?
class db
{
function connect()
{
$lines = file('secret');
$uid = trim($lines[0]);
$pw = trim($lines[1]);
$dbserver = trim($lines[2]);
...
0
votes
2answers
13 views
Generic while loop through mysql query result
I'm wondering if there's a way - using php - to loop through a mysqli query result and display the column name, and the data... so,
Name => Joe Bloggs,
Age => 23
effectively allowing me to change ...
-3
votes
0answers
27 views
Warning: mysql_result() expects parameter 1 to be resource, boolean given in
I have a problem with the following code at line 53 and I have so many .php files with this problem.
Here are lines 51 to 56:
$n=mysql_result(mysql_query("SELECT COUNT(*) FROM `servere` WHERE ...
1
vote
1answer
53 views
Why is this SQL processing twice?
Basically, for some reason my SQL for an INSERT query is processing twice and I'm not sure why.
Here's my form :
<form class="form-horizontal" method="POST" action="">
<input id="email" ...
0
votes
3answers
45 views
PHP/MYSQL Averaging each row
I have a form with X amount of columns that are labeled C1, C2, C3..to CX. I also have a column labeled "Average" and another labeled "Target". The "Average" column finds the average of each row in ...
-1
votes
1answer
15 views
HTML email submission to MySQL database using php jquery and ajax without leaving page
I am trying to submit emails to a database (already created) without leaving the current page. I have tried many examples from stack overflow and others, with no success.
My code (most of it taken ...
-1
votes
4answers
21 views
mysqli update query syntax error
I'm getting the following error message, something wrong with the syntax of my code apparently but I'm not sure what it is. If I change the $data to something simple like "pie" it will update. Seems ...
0
votes
4answers
17 views
Create mysql compatible Date from variables in PHP
I have a field set to type date in a mysql table. I get day, month and year from user and at the moment I have the values returned like this:
[start_dateMonth] => 08 //$stardMonth
[start_dateDay] ...
0
votes
4answers
38 views
Different if statements in php
So i have a php register script on my website which is mysql i have noticed today somebody has registered with the same username has a staff member. I have tryied to do it my self but the if statement ...
-2
votes
2answers
38 views
how to separate links by comma in php? [on hold]
<td bgcolor="#FFFFFF"><a href='<?php echo $rows['Labels'];?>' target="_blank"><?php echo $rows['Labels']; ?></td>
I have a row named Labels in my datadase. When I enter ...
1
vote
1answer
47 views
Selecting Lowest Continuous Value?
Background Story
I have an MYSQL table that stores application data for an annual race. Among other things, the table holds the Racer's ID and the year for that race application.
This year, we want ...