Jump to content

mendoz

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

Everything posted by mendoz

  1. You use $_POST in the page where you receive the data from the form
  2. Remember when you used this: <?php $ud_id=$_GET['id']; ?> First of all, You should have used $_POST instead of $_GET $_GET is when you have something like this: mypage.php?id=3 so for every input in your form you should pass it's value to a variable example: <input name="id" value="3"> $id = $_POST["id"] example: <input name="mytext" > $mytext = $_POST["mytext"] You would like to get all the data which you just sent.
  3. You are just using variables without giving them values. some thing like: <?php $ud_title = $_POST['ud_title']; ?> in here <?php $ud_id=$_GET['id']; $username=""; $password=""; $database=""; mysql_connect(localhost,$username,$password); $query="UPDATE gosscustomers SET title='$ud_title',first_name='$ud_first_name', surname='$ud_surname', company='$ud_company', address_1='$ud_address_1', address_2='$ud_address_2', address_3='$ud_address_3', postcode='$ud_postcode', country='$ud_country', email_address='$ud_email_address' WHERE id='$ud_id'"; mysql_query($query); echo "Record Updated"; mysql_close(); ?>
  4. Can acyou establish a connection? if not you may want to use your queries like this: <?php $connection=mysql_connect(localhost,$username,$password); $query="UPDATE gosscustomers SET title='$ud_title' WHERE id='$ud_id'"; mysql_query($query,$connection); ?>
  5. yope Well... This is a simple upload script which fails to work on Internet explorer. May you tell me why? <?php // we connect to the database require("../conn.php"); // we get the id $id = $_GET['id']; // we get the file which has been uploaded ot not $userfile = basename($_FILES['uploadedfile']['name']); // we check if a file has been uploaded if (!empty($userfile)) { //This function separates the extension from the rest of the file name and returns it function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } //This applies the function to our file $ext = findexts ($_FILES['uploadedfile']['name']) ; //This just gives nanny5 etc $ran2 = "nanny".$id."."; //This assigns the subdirectory you want to save into... make sure it exists! $target_path = "../images/nannies/videos/"; //This combines the directory, the random file name, and the extension $target_path = $target_path . $ran2.$ext; // if it does not succed the tell the user if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { $uploadsql = "UPDATE `nannies` SET `vid`='".$ran2.$ext."' WHERE `id`=$id"; mysql_query($uploadsql,$connection); } else{ echo "There was an error uploading the file, please try again!"; } } ?>
  6. Maybe this <?php $id=$_GET['id']; // $id=5 $var='hello'; // $var=hello $newvar=$var.$id; // $newvar=hello5 ?>
  7. This was easy man, check line 37 nope? Post the code and it'll be easier
  8. Hey freaks This time I am trying to save a file after it was processed with phpthumb. I want to remove the old file and put the new one instead. <?php $file = '../thumb/phpthumb.php?src=../images/file.jpg&w=100'; $destination = '../images/file.jpg'; copy($file,$destination); ?> This is what I get: failed to open stream: Invalid argument Prove your freakness! please..
  9. <?php foreach($_POST as $varName => $value) { $dv=$value; print "<b>$varName</b>: $dv<br>"; }; ?> seemed to work
  10. Thanks man but use what as an array ???
  11. Hey guys. I have a form with 100+ fields (a client, don't ask) I guess I can be doing $_POSTs all day long and then a long long query. Maybe you heard about an easier method... Thanks, Dror
  12. If you want to show both cells you can only sort them by one, otherwise the data won't match the row.
  13. I just want to short this thing... <img name="logo2" id="logo2" onmouseout="papiton('logo2')" onmouseover="papito('logo2')" src="images/logo2.jpg" /> I think by using "this"
  14. Hey Java freaks. This is my first ever JS function... <script type="text/javascript"> function papito(obj) { document[obj].src="images/"+obj+"_on.jpg" } function papiton(obj) { document[obj].src="images/"+obj+".jpg" } </script> When I hover over an image this function is called like this: <img name="logo2" onmouseout="papiton('logo2')" onmouseover="papito('logo2')" src="images/logo2.jpg" /> Notice that I need to set a name to the image... This has to be easier to do, right? let's see what you got!
  15. msn: dror_Wolmer@hotmail.com I can help you with that
  16. Perhaps you could insert your image before you begin the uploading process. When It's done you could print: File has been uploaded
  17. Sorry but I'm not as good with javascript. An example could be nice thanks, Dror
  18. Just using Firefox auto correction. Corrected some of your words hi, i need to work on poll script..which should work as follows.. suppose say their is category of politicians... say 3 politicians...then there should b sub-category of questions.. such that each politician have 3 question with options.. so each politician should be voted for that set of questions.. and votes result should be displayed based on question and politician.. how do i do this? i have a form which displays all politicians and questions associated with them...how do i generate results. its urgent. regards varsha
  19. Hey Freaks. Well, the situation is like this: I have a form with an option box, which has "yes" and "no". I'd thought it'd be cool if when "yes" is selected another table row (tr) would appear and disappear when "no" is selected. Being a JS noob I need your help. Thanks, Dror
  20. Hello again  :o :o :o :o Almost done with this thing: http://control-pc.co.il/products/testar.php Please go inside and check the hp one. see? instead of giving [i]h[/i]p it gives [i]h[/i]. this is the code [code]<?php echo rtrim($files[$i],".jpg"); ?>[/code] What is wrong with me?!
×
×
  • 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.