Jump to content

hakimserwa

Members
  • Posts

    230
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://chiefbwette.co.za

Profile Information

  • Gender
    Male

hakimserwa's Achievements

Member

Member (2/5)

0

Reputation

  1. that is wrong. if you want to go the loop way it would be $mult = array ( 0 => array ( 'sno' => 'q3', 'result' => '15', ), 1 => array ( 'sno' => 'q1', 'result' => '5', ), 2 => array ( 'sno' => 'q2', 'result' => '10', ), ); $marged = array(); foreach($mult as $value){ foreach($value as $key => $mult_value){ $marged[$key]= $mult_value; } } //$marged array will only have two element becuase all sub array keys are the same. the loop overrides keys of the same name it better you use array index or change the index keys to unique names
  2. try this if(document.registerationform.emailtxt.value=="") { document.getElementById('une').innerHTML = "Email id requered"; registerationform.emailtxt.style.border="solid red"; // add this registerationform.emailtxt.focus(); return(false); }
  3. set the charset in the head of you document to UTF-8 this will solve your problem
  4. use array_merge http://www.php.net/manual/en/function.array-merge.php
  5. start by trying out something then at some point when you are stack, post you code then you will be corrected. the best way of teaching your self to code is teaching your self to try.
  6. try removing the last set of quotation marks $a = mysql_query("select * from twitter_access_tokens ORDER BY RAND() DESC LIMIT ".$limit.""); to $a = mysql_query("select * from twitter_access_tokens ORDER BY RAND() DESC LIMIT ".$limit);
  7. <form action="frmGen" method="post"> <input name="txtAddr" type="text"> <!-- User enters text here -- Confirm txtAddr.text = $VarAddr -- If True, continue. If False, display DIV message --> <input name="txtDest" type="text" style="display:none"> <!-- Text field is filled with value from server/SQL when btnGen is pressed--> <input name="txtKey" type="text" style="display:none"> <!-- Text field is filled with value from server/SQL when btnGen is pressed--> <input name="btnGen" type="button"> <!-- assuming txtAddr is True, display strings in 2 text fields above & store all values from 3 text boxes in SQL --> </form> javascript using jquery function check_txtAddr(){ var txtAddr = $("form input[name=txtAddr]").val(); // post the value to a php script that will check if txtAddr = to the valuable you are checking. // if it does show the other two input fields. // use the jquery post function. $.post(check_txtAddr.php, {txtAddr:txtAddr}, function(data) { // catch the response data from the php file var txtDest = data['txtDest']; var txtKey = data['txtKey']; if (txDest !== ""){ $("form input[name=txDest]").attr("value", txDest); $("form input[name=txDest]").show(); } if (txtKey !== ""){ $("form input[name=txtKey]").attr("value", txDest); $("form input[name=txtKey]").show(); } }, 'json'); } $("document").ready(function() { $("form input[name=btnGen]").click(check_txtAddr); }); php script check_txtAddr.php if (isset($_POST['txtAddr'])){ // check if $_POST['txtAddr'] == to the valuable you want to check if ($_POST['txtAddr'] == $your_valuable){ //prepare the response return value to jquery $txtKey = //what ever you want to populate in that field $txDest = //what ever you want to populate in that field // return the response by echoing it out as json encoded data for simplist make it an array. echo echo json_encode(array('txtKey'=>$txtKey,'txDest'=>$txDest)); } } Try it its not tested but i believe it can give you a starting idea on what you have to do. Thing that you need to make more research about how they work is jquery post method, json. good luck
  8. The question is not clear, The search bar that you want to remove i beleive you talking about html. now if this is an online site can you just post a link to the site?
  9. try using the code tag so we can able to read your code clearly
  10. if you dont know ask you are ashaming the guru tag. check the code if it gives any error report the error. by the way what was your solution to the problem? you could not even see that the guy's $message was not set. by the way those {} are called inline substitution. call it a day you lernt something new.
  11. replace this for your $message $message = <<<MAILBODY Name: {$first $last} Business Name: {$business} Conact Numbers: Home: {$home} Cell: {$cell} Other: {$other} Preferred Contact time: {$con_time} Address: Street Address: {$street} City: {$city} State: {$state} Zipcode: {$zip} MAILBODY;
  12. when you go to a night club, after you pay the bauncers nomaly stamp on your hand a stamp that shows other security officials that you have already paid and you have gone through the neccesary check. At this point lets call a $_SESSION['login'] to be our stamp That is going to tell all pages that requires login that this person has been checked in and here is the stamp. Now what you need to do is on each page where you require login, put this code right at the beggining before anything is written. // check if session login is set from the login page. if(!isset($_SESSION['login'])){ header("Location: login.php"); exit; }
×
×
  • 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.