[PHP-DB] Re: [PHP] PHP & Database Problems -- Code Snippets

2012-05-02 Thread Duken Marga
ow7[0]; > > echo "\n"; > echo " $Indx \n"; > echo " $Site \n"; > echo " $_GLOBALS[mdr] \n"; > echo " $Notes \n"; > echo " $Weight \n"; > echo " $BMI \n"; > echo " $Date2 \n"; > echo "\n"; > > > while($row8 = mysqli_fetch_array($result2, MYSQLI_BOTH)) > { >global $finished; >echo "\n"; >echo " $row8[0] \n"; >echo " $_GLOBALS[mdr] \n"; >echo " $row8[2] \n"; >echo " $row8[3] \n"; >echo " $row8[4] \n"; >echo " $row8[5] \n"; >echo " $row8[6] \n"; >echo "\n"; >echo "row8"; print_r($row8[1]); > > } >echo ""; >$flag = 1; > > } >} /* end step4 */ > } /* End Switch */ > > WELCOME SCREEN: > >function show_welcome() >{ > > $first_name = isset($_REQUEST["Fname"]) ? $_REQUEST["Fname"] : ""; > $last_name = isset($_REQUEST["Lname"]) ? $_REQUEST["Lname"] : ""; > $medrec = isset($_REQUEST["MedRec"]) ? $_REQUEST["MedRec"] : ""; > $phone = isset($_REQUEST["Phone"]) ? $_REQUEST["Phone"] : ""; > $height = isset($_REQUEST["Height"]) ? $_REQUEST["Height"] : ""; > > echo ""; > echo " Site: />"; > echo " Record Number: value='", $medrec, "' />"; > echo " First Name: "; > echo " Last Name: "; > printf("Two Capital Letters\t\t\t Five Numbers\t\t\t\t Text - No > Numbers\t\t\t Text - No Numbers\n\n\n"); > echo " Phone: "; > echo " Height: "; > printf("XXX-XXX-\t\t\tInches\n\n"); > echo " Male checked>"; > echo " Female >"; > echo " "; > echo " "; > echo " value='already_seen'>"; > >} > ?> > > I hope this helps. > > Ethan > > > > > > > > > > > > > > > > > > > > > > > > > > -- > Ethan Rosenberg, PhD > Pres/CEO > Hygeia Biomedical Research, Inc > 2 Cameo Ridge Road > Monsey, NY 10952 > T: 845 352-3908 > F: 845 352-7566 > <mailto:erosenberg@**hygeiabiomedical.com > >erosenber**g...@hygeiabiomedical.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Duken Marga

Re: [PHP-DB] setting SQL variable

2007-01-19 Thread marga
You are the right. Is possible use mysql_insert_id() and it need not stack the queries and confirm these one by one. Thanks a lot!! OKi98 wrote: > marga wrote: > >> Is not possible to use mysql_insert_id() and assing it in a php >> variable, because >> mysql_insert_id

[PHP-DB] setting SQL variable

2007-01-18 Thread marga
$query2 = "INSERT INTO rel_2 (id_table4, id_table1) VALUES (".$_POST['idtable4'].", @id_last_table1 );"; $query = $query1.$query2; mysql_query($query); if (mysql_errno() || $error==1) { mysql_query("ROLLBACK");