Jump to content

Karyna

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Karyna

  1. PLEASEEE no matter what i do... datepicker always post the dates as string i do whatever ways know convert string to date but no way!! how convert string to date so i can sarch in a mysql table... tnx in advanced <!--HTML--> <div class="control-group"> <label class="control-label">from</label> <div class="controls input-append date form_date" data-date="" data-date-format='yyyy/mm/dd' data-link-format="yyyy/mm/dd"> <input size="16" type="text" value="" id="from" name="from"> <span class="add-on"><i class="icon-th"></i></span> </div> <input type="hidden" id="d" value="" /><br/> </div> <div class="control-group"> <label class="control-label">tto</label> <div class="controls input-append date form_date" data-date="" data-date-format='yyyy/mm/dd' data-link-format="yyyy/mm/dd"> <input size="16" type="text" value="" id="tto" name="tto"> <span class="add-on"><i class="icon-th"></i></span> </div> <input type="hidden" id="h" value="" /><br/> </div> <div class="card-body"> <button type="submit" class="btn btn-secondary">search...</button> </div> <!--PHP--> $yfromx=$_POST['from'] ; $yuntilly=$_POST['untill'] ; $yfroma=str_replace(" ","/","$yfromx"); $yuntillb=str_replace(" ","/","$yuntilly"); $t1=gettype ( $yfromx ) ; $t2=gettype ( $yuntilly ) ; $yfrom=date('Y/m/d', '$yfroma'); $yuntill=date('Y/m/d', '$yuntillb'); $t3=gettype ( $yfrom ) ; $t4=gettype ( $yuntill ) ; echo $yfroma.' | '.$yuntillb.' | '.$t1.' | '. $t2.' | '.$t3.' | '. $t4; //SELECT username FROM oc_calendar WHERE start_date between '$from' AND '$to' $queryfebus = "SELECT distintc FROM glamm_pedidos WHERE fecha_folio between '$yfrom' AND '$yuntill';"; //$queryfolb = "SELECT *M glamm_pedidos WHERE procesado='$yfoliox' or folio='$yfoliox' or nombre like '%$yfoliox%' or mail like '%$yfoliox%';"; $resultfebus = mysqli_query($con,$queryfebus) or mysqli_error($con); blah blah
  2. MY mistake... upload files doesn´t work when i execute from local host.. i must upload the php files to server THEN EXECUTE from the on line page. tnx
  3. hi everybody... i cant explain why i have this error.... i do this upload files thing many times but now... i have 2 php files one is like this: ***************** <form id="form1" name="form1" method="post" action="go_upload.php"> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr> <td><p>Imagen de Muestra: <input name="filename1" type="file" id="filename1" value="..." size="60" /> </p> bla bla bla <input type="submit" name="button" id="button" value="Upload File" /> </form> the other file is like this go_upload.php *********************** $target = "models_bags/"; $target = $target . basename( $_FILES['filename1']['name']) ; <- line 55 $ok=1; if(move_uploaded_file($_FILES['filename1']['tmp_name'], $target)) <- line 57 { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } THE ERROR WHEN I RUN THE FILES IS: Notice: Undefined index: filename1 in C:\Mywebsites\bagsite\go_upload.php on line 55 Notice: Undefined index: filename1 in C:\sitiosweb\imprebolsa\go_upload.php on line 57 Sorry, there was a problem uploading your file. tnx for help me plssss
  4. :'( nop... doesnt work without quotes... what i want to do is send meil to the one in the variables meil2 and jobmeil2.. why are not send it??
  5. i have a php form that recolect data form users and send some emails... i have no problems with that, but the part is drive me crazy its that as i show in the below example of my code only the last 2 mails are sent.. the first 2 not!! i been tried no quites, single quotes, double quotes... no use the first 2 mails are not sent.. only the last 2.. whats wrong?? php mail function dont accept variable names in the '$to' parameter??... the echo lines at the end i wroted so i sure the variables have the vaue wich its true... pls.. some one help in this!! :-\ :'( TNX .blah .blah . $meil2=$_POST['meil']; $jobmeil2=$_POST['jobmeil']; .blah . mail('$meil2',"VELEC 2012, Resgister succced!","{$datav}","From: info@velec.com"); mail('$jobmeil2',"VELEC 2012, Register succed!","{$datav}","From: info@velec.com"); mail("george.scott@stet.com","VELEC 2012, new customer has register !","$data_cust","From: info@velec.com"); mail("support@stet.com","VELEC 2012, new customer has register !","$data_cust","From: info@velec.com"); <?php echo $meil2; echo $jobmeil2; ?>
  6. im designin an "e-bay" like site and i need to do a page where administrator can activate or deactivate some pods.. so far im doing ok.. but have soe trouble with that page.. heres y code... the administrator writes de code of the post and click the button to search 4 it.. it fouds and then click a 2nd button to activate it means write an "1" in a field called "activo"... BUT IT DOESNT... <?php if(isset($_POST['button_a'])){ $lacla = $_POST['anucod']; mysql_query("UPDATE anuncios SET activo=1 WHERE clave='$lacla'") or die(mysql_error()); } ?> <?php if(isset($_POST['button'])){ $lacla = $_POST['anucod']; $lacla2=trim('$lacla'); mysql_select_db($database_clasif, $clasif); $cuerye="select * from anuncios where clave='$lacla'"; $result = mysql_query($cuerye) or die(mysql_error()); $row_anuncios = mysql_fetch_assoc($result); $totalRows_anuncios = mysql_num_rows($result); if (mysql_num_rows($result) > 0) { //User exists ?> <form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p> <input type="text" name="anucod" id="anucod" /> <input type="submit" name="button_a" id="button_a" value="ACTIVATE POST" /> </p> <?php echo "<br>"; echo "<br>"; echo "<br>"; echo "<br>"; echo "<br>________________________________________________________"; ?> </form> <?php } else { //User does not exist echo '0'; } } ?> <form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p> <input type="text" name="anucod" id="anucod" /> <input type="submit" name="button" id="button" value="enter post code..." /> </p> </form> </body>
  7. hi all i have a problem i guess my code is right but i dont know what im doing wrong pls helpp i have one page lets say comiditis.php <form id="form1" name="form1" method="post" action="comoditi2.php"> bla, bla, bla $totalRows_Recordset1 = mysql_num_rows($Recordset1); $comodi=$row_Recordset1['nm']; $arr = explode(",", $comodi); $i=0; foreach ($arr as &$value) { //$value = $value * 2; // echo $arr[$i]."<br />\n"; $aidi=$arr[$i]; ?> <label> <input name="comoditis" type="checkbox" id="<?php echo $i;?> " value="check" /> <?php echo $aidi; ?> </label> <?php $i++; } ?> *********************************************************** comiditi2.php <?php // $ai=$_POST['comoditis']; <<<---- heres my problem!!! // echo $ai; ?> HOW I KNOW WHAT CHECKBOXES ARE CHECKED??? i cant even print the values of the array??? whatv im doing wrong?? tnx in advance
  8. hi guys im drivn nuts i was sure was easy but i do get it.. i have a table like this item clasif out ----------------------------------------- apple fruit lbs orange fruit lbs pumpkins vegetable box banana fruit lbs pineapple fruit box i did 3 drop menus clasif item out when the user select from 1st drop let say "fruit" the second drop must filter the database to all fruits and when select let say orange from 2nd drop the 3rd must contain just lbs... i try many ways but no one give me that filter!!! plss will sombody helppp??
  9. hi everyone i have a question i tought was easy but im having some problems i have 3 dropdowns menus the customer select one category from one of them.. let say "pets" the the other dropdown must be filled with pets (dogs, cats, parrots...) if the customer select dogs the 3rd dropdown must filled with (doberman, bulldog,chihuhaua, etc) i think u got the idea.. but im having trouble with the 2nd and 3rd dropdown... any ideas::: tnx in advncd
  10. TNX TO ALL but i finally get it the mistake was in the double quotes i this lines $word='"SELECT * FROM models WHERE descrip LIKE ' ."'"; |____ this double quote must go!!! $srched=$_POST['words']; $pieces = explode(" ", $srched); $all=count($pieces)-1; for($i=0;$i<=$all;$i ++) { $word = $pieces[$i] ."'"; if($i!=$all) { $word .= $word . ' OR descrip like ' . "'"; } else { $word .= $word .'"' . ";"; |__ this double quote mus t go to hell too!!! } } $colname=$word; mysql_select_db($database_zero1, $zero1); $query_srch = $colname; $buscar = mysql_query($query_srch, $zero1) or die(mysql_error()); $row_srch = mysql_fetch_assoc($srch); $totalRows_srch = mysql_num_rows($srch);
  11. hi every1 im driveing crazy with this... i have a database with a field with descriptions of products named "DESCRIP" in the main page i have a text field where user write the words to search for i wanrt make an "SELECT * FROM models where descrip like xxx OR descrip like xxx... bla bla bla" i wrote this code but send me an error... waht can be wrong??? $word='"SELECT * FROM models WHERE descrip LIKE ' ."'"; $srched=$_POST['words']; $pieces = explode(" ", $srched); $all=count($pieces)-1; for($i=0;$i<=$all;$i ++) { $word = $pieces[$i] ."'"; if($i!=$all) { $word .= $word . ' OR descrip like ' . "'"; } else { $word .= $word .'"' . ";"; } } $colname=$word; mysql_select_db($database_zero1, $zero1); $query_srch = $colname; $buscar = mysql_query($query_srch, $zero1) or die(mysql_error()); $row_srch = mysql_fetch_assoc($srch); $totalRows_srch = mysql_num_rows($srch); tnx in advcd
  12. heyyy tnx to all.... i finally get it ... with a litle of ur answers... hughss!!
  13. im driving mad with this... i know my code is right but i must be missing something i have no syntax errors, the page doesn´tn display any error...i must save in a database each item buy it by customers.... but no values are stored i believe the insert to statement must be some wrong the code i using is this num_rows was obtained by count the nmber of fields al fields are numeric except descrip and pictu are varchar for($i=0;$i<=count($estimate)-1;$i ++){ if($estimate[$i] != NULL){ $qty=$estimate[$i]['qty']; $descripp=$estimate[$i]['descrip2']; $ppictu=$estimate[$i]['pictu']; $pprice=$estimate[$i]['price']; $subt=$estimate[$i]['price']*$estimate[$i]['qty']; echo $i; <-- it displays each number correct so the value of $estimate its OK!! mysql_query("INSERT INTO estimates (numb, name, mail, qty, descrip, pictu, unit, stotal, gtotal,item) VALUES ($num_rows, '$_POST[name]', '$_POST[mail]', $qty, $descripp, $ppictu,$pprice, $subt, $total, $i);"); { ¨{ also try this with same result... $cuery='"'; $cuery.='INSERT INTO estimates (numb, name, mail, qty, descrip, pictu, unit, stotal, gtotal,item) VALUES (' ; $cuery.="'"; $cuery.= '$num_rows'; $cuery.="', "; $cuery.="'"; $cuery.='$_POST[name]'; $cuery.= "', '"; $cuery.= '$_POST[mail]'; $cuery.= "', '"; $cuery.= '$qty'; $cuery.="', "; $cuery.='"$descripp", '; $cuery.='"$ppictu", '; $cuery.= "'"; $cuery.= '$pprice'; $cuery.="', '"; $cuery.='$subt'; $cuery.="', "; $cuery.='$total'; $cuery.="', "; $cuery.='$i'; $cuery.=');'; $cuery.='"'; mysql_query("$cuery");
  14. hi every one im driving crazy maybe im missing sometihing i have a php code that give a shoping cart that my customers shop in my website... the final page look like this final.php displays: QTY DESCRIPTION PRICE ------|---------------------------------------|----------------------|-----------| 3 | professional noteboks | (picture of item) | 3.95 | ------|---------------------------------------|----------------------|-----------| 2 | drawing paints | (picture of item) | 2.00 | ------|---------------------------------------|----------------------|-----------| Total | 5.95 | [sent to my mail] the button has the link to another php page (send.php) that has this code <?php $name=$_POST['name']; $mail=$_POST['mail']; $subject = "Send me this items"; $message = file_get_contents('http://www.mydomain.net/final.php') ; $headers .= "Return-Path: mymail@hotmail.com\r\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-Type: text/html; charset=ISO-8859-1'."\r\n"; $headers .= "From: mymail@domain.net\r\n"; mail($mail, $subject, $message, $headers); ?> ALL ITS FINE!!! but only recieve an empty table NO IMAGES, NO INFO, NO LOGOS :'( :'( am i missing something in the code?? TNX A LOTT
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.