Dynamically load pricing from MySQL...
Created the form, excepting payments just fine. Wanted to load the pricing from a mysql database to be able to provide that information on the fly.
Everytime I load in the variables it is fine, when submit is entered, it drops out the pricing and throws an error.
"form_field" doesn't have a valid value.
It is dropping the variable when form is submitted.
Any ideas?
Everytime I load in the variables it is fine, when submit is entered, it drops out the pricing and throws an error.
"form_field" doesn't have a valid value.
It is dropping the variable when form is submitted.
Any ideas?
Are you using the form script to embed it in your page? If so try dropping the javascript that surrounds it.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
First thing I tried actually.
Then I even went into the form direct.
http://example.com/coffee_cup_form/coffee_cup_form.html
and tried to work from there. Upon submit, pushes back to: ../coffee_cup_form.php where the variables are all dropped.
Then I even went into the form direct.
http://example.com/coffee_cup_form/coffee_cup_form.html
and tried to work from there. Upon submit, pushes back to: ../coffee_cup_form.php where the variables are all dropped.
What does you mysql php look like?
I can't get to your form.
I can't get to your form.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
<head>
<?php
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
?>
/////
<div class="fb-dropdown">
<?php echo "<select id='item31_select_1' data-hint='' name='type_registration'>";
echo "<option id='item31_0_option' selected value='Individual- $ $price'>Individual- $ $price</option>";
echo "<option id='item31_1_option' value='Team- $$team_price'>Team- $$team_price</option>";
echo "</select>";
?>
</div>
Third variation here of the PHP. Started with just allowing the printing the variables for the value's and the display text.
Such as:
Select>
<option value="$price"><?php echo "$price"; ?></option>
http://bluenotebookmedia.com/test/victo … ration.php
<?php
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
?>
/////
<div class="fb-dropdown">
<?php echo "<select id='item31_select_1' data-hint='' name='type_registration'>";
echo "<option id='item31_0_option' selected value='Individual- $ $price'>Individual- $ $price</option>";
echo "<option id='item31_1_option' value='Team- $$team_price'>Team- $$team_price</option>";
echo "</select>";
?>
</div>
Third variation here of the PHP. Started with just allowing the printing the variables for the value's and the display text.
Such as:
Select>
<option value="$price"><?php echo "$price"; ?></option>
http://bluenotebookmedia.com/test/victo … ration.php
I think your setup isn't quite right. Try it this way.
Make a php page with all your mysql php on it.
victoria_prices.php
Then use an include in your form html

Make a php page with all your mysql php on it.
victoria_prices.php
<?php
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
echo "<option value='Individual- $ $price'>Individual- $ $price</option>";
echo "<option value='Team- $$team_price'>Team- $$team_price</option>";
?>
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
echo "<option value='Individual- $ $price'>Individual- $ $price</option>";
echo "<option value='Team- $$team_price'>Team- $$team_price</option>";
?>
Then use an include in your form html
<div class="fb-dropdown">
<select id='item31_select_1' data-hint='' name='type_registration'>
<?php include('../../victoria_prices.php');?>
</select>
</div>
<select id='item31_select_1' data-hint='' name='type_registration'>
<?php include('../../victoria_prices.php');?>
</select>
</div>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Will try now.
Still giving the same error. It's dropping the php no matter what. Even when I just do it straight.
<option value="<?php echo "Individual $100"; ?>">Individual $100</option>
I'll keep playing
<option value="<?php echo "Individual $100"; ?>">Individual $100</option>
I'll keep playing
Try dropping the value.
<?php
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
echo "<option>Individual- $ $price</option>";
echo "<option>Team- $$team_price</option>";
?>
include_once("class/functions.php");
include_once("login.php");
$data = mysql_query("SELECT * FROM api_featured_event WHERE id='2'") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
$price = $info['price'];
$team_price = $info['team_price'];
}
echo "<option>Individual- $ $price</option>";
echo "<option>Team- $$team_price</option>";
?>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.