Search found 96 matches
- Fri Apr 27, 2012 6:02 pm
- Forum: PHP - Code
- Topic: re-post variable on http-equiv=refresh ...
- Replies: 3
- Views: 2629
Re: re-post variable on http-equiv=refresh ...
not sure how to do that in form A on page A on submit the variable in the form is <input type="text" name="fild_id"> on the next page, page B $file_id = mysql_real_escape_string($_POST['file_id']); then on Page C i run a query to input into the DB WHERE file_id = '$file_id' the d...
- Thu Apr 26, 2012 1:30 pm
- Forum: PHP - Code
- Topic: re-post variable on http-equiv=refresh ...
- Replies: 3
- Views: 2629
re-post variable on http-equiv=refresh ...
i run some form code which posts a variable to the next page the next page is a form that does things and relies on the previously posted variable to tell it which record in the db to post to once i submit to form, the table updates like it should and i redirect to the page where it all started. but...
- Sun Apr 22, 2012 2:27 pm
- Forum: PHP - Code
- Topic: pull data from a site and place it in a form
- Replies: 3
- Views: 452
pull data from a site and place it in a form
my users comes to a field that asks for a value.
from the form they enter an address.
what i want to to grab that address from the form, get the value from another site, and add the value to the field.
from the form they enter an address.
what i want to to grab that address from the form, get the value from another site, and add the value to the field.
- Sun Apr 22, 2012 2:22 pm
- Forum: PHP - Code
- Topic: calculate amortized RATE not payment for mortgage
- Replies: 3
- Views: 1250
calculate amortized RATE not payment for mortgage
hi with this code i get an amortized, principal and interest payment calculation: amount: $100,000 term: 30 (years) rate: 5% payment: UNKNOWN solve for payment ... // initialize variables $sale_price = 0; $annual_interest_percent = 0; $year_term = 0; //This function does the actual mortgage calculat...
- Thu Apr 12, 2012 9:20 am
- Forum: PHP - Code
- Topic: session_register depricated
- Replies: 2
- Views: 740
Re: session_register depricated
thanks. it was easier than i thought
login
subsequent pages
login
Code: Select all
$username = count($_POST)?$_POST['username']:'';
$Session = $_SESSION["Session"];
$_SESSION['user']=$username;
Code: Select all
<? session_start();
if(!$_SESSION["user"]){
header("location:login.php");
?>
- Wed Apr 11, 2012 11:32 pm
- Forum: PHP - Code
- Topic: session_register depricated
- Replies: 2
- Views: 740
session_register depricated
i have been using session_register to pass along the username to the various pages of my data system. i remember it took me forever to figure out how to do that. i like it because as i go from page to page while logged in i can use a query based on the username and do useful things with it in php 5....
- Fri Mar 30, 2012 9:13 am
- Forum: PHP - Code
- Topic: read from two mysql tables into one form
- Replies: 4
- Views: 1313
Re: read from two mysql tables into one form
this solved the problem (placing this code just above the lower half of the form where the data was to be pulled from the second table) <? } $sql = mysql_query("select * from sec_data where file_id = '$term2'"); while ($row = mysql_fetch_array($sql)) { ?> iow, closed the first query above,...
- Thu Mar 29, 2012 10:54 pm
- Forum: PHP - Code
- Topic: read from two mysql tables into one form
- Replies: 4
- Views: 1313
Re: read from two mysql tables into one form
$sql = mysql_query("SELECT * FROM ldata AS a JOIN cdata AS b ON b.file_id = a.id WHERE id = '$term'"); while ($row = mysql_fetch_array($sql)) Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/inovapro/public_html/data/edit_a.php on line 42 $sql = mysq...
- Thu Mar 29, 2012 8:51 pm
- Forum: PHP - Code
- Topic: read from two mysql tables into one form
- Replies: 4
- Views: 1313
read from two mysql tables into one form
i have a long form with several fields for submission. i used this code for a long time and it worked great -- if all i needed was data from one table to be fed into the form: <? include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( &q...
- Thu Mar 29, 2012 8:41 pm
- Forum: PHP - Code
- Topic: navigating a link, grabbing the text, parsing a string
- Replies: 2
- Views: 211
- Thu Mar 22, 2012 9:42 pm
- Forum: PHP - Code
- Topic: navigating a link, grabbing the text, parsing a string
- Replies: 2
- Views: 211
navigating a link, grabbing the text, parsing a string
a while back i was using visual basic progs to grab data from the internet i would load a text file with web links, hit one at a time, grab the text, place the text in memory, find the text on the page i was looking for, save that to a file, and then loop to the next link until i was all done. is th...
- Fri Feb 24, 2012 8:17 pm
- Forum: PHP - Code
- Topic: amend mysql table column en masse
- Replies: 1
- Views: 410
amend mysql table column en masse
i have a mysql table called 'data' and 2 columns called 'id' and 'name'
there are 100 records where 'id' = "orange"
what i want to do is write some php code that says:
where id="orange" change name to say "hello'"
any ideas greatly appreciated
there are 100 records where 'id' = "orange"
what i want to do is write some php code that says:
where id="orange" change name to say "hello'"
any ideas greatly appreciated
- Fri Feb 24, 2012 8:13 pm
- Forum: PHP - Code
- Topic: populate select options from mysql db
- Replies: 4
- Views: 662
Re: populate select options from mysql db
got it, thanks, works perfectly
- Fri Feb 24, 2012 2:28 pm
- Forum: PHP - Code
- Topic: populate select options from mysql db
- Replies: 4
- Views: 662
Re: populate select options from mysql db
here is what i have extrapolated from that post: <span class="style4"><select name="company"> <!-- insert --> <?php include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $quer...
- Fri Feb 24, 2012 1:32 pm
- Forum: PHP - Code
- Topic: populate select options from mysql db
- Replies: 4
- Views: 662
populate select options from mysql db
i have a table named data with 5 records. in a column named 'product' i have 5 entries: door table seat carpet window i have a field in an html form named 'products'. it is a "select" field, and i want to read from the data table all the entries in the product column to a user looking at t...