198 Posted Topics
Re: He has three different DB queries, one is getting admins ($row1) one is geting staff with a banned account ($row) and the other gets Staff withour a banned account (no variable set for this one). While this method works it would be just as easy to make this all one … | |
Re: Wrap your nav div in a wrapper div. Set the wrapper div width:100% set the nav div to the width of the page content than margin:0 auto; : .nav_wrapper{ width:100%; background-color: #FFF; //Change this to the background color of your nav bar } .nav_bar{ width: 800px; //Change this to the … | |
Re: Your inputs all have the same ID / Name so when JS does the getElementById it just gets the first element it finds on the DOM. You could convert everything into an array and turn it into JSON, you'd have to look up how to do this with standard JavaScript … | |
Re: I don't know what you want to dictate what element gets what color. But if you create three different CSS styles you can change the class of a td element: document.getElementById("234").className = "green_box"; | |
Re: Once you submit that form to PHP all your radio box values will be available in the $_POST array by their name (i.e. $_POST['Answer1'] would have a value of LID1_1 or LID1_2 depending on which answer was selected. From there you just need to do a conditional if statement if($user_answer … | |
Re: Its diffacult to help when we don't have any code, how can we suggest "another" solution when we don't know what you're doing now? On a side note, this is an HTML CSS issue not a PHP issue so it's posted in the wrong place as well. Generally, if you … | |
Re: A lot of the big social media websites have what's called an API (i.e. https://dev.twitter.com/ and http://developers.facebook.com/) which will allow you to have a user login to their account from your website at which point you can interact with their friends. | |
Re: I agree with pritaeas, when it comes to security the more "layers" you can have the more secure you will be. While PDO helps to mitigate risk, there will always be unexpected input or ways discovered to circumvent that particular security check. For proper risk management I would alwyas verify … ![]() | |
Re: The printf function expects a string passed to it as a parameter to output. i.e. printf('Hello Word') you don't need it, you can just run the query. $qry="Insert into `postjob` (jobtitle,positions,category) VALUES('".$_POST['title']."','".$_POST['position']."','".$_POST['cate']."')"; `mysql_query($qry) or die (mysql_error());` | |
Re: Just thinking outside the box here, could always be a misconfigured session setting in php.ini or cookies disabled. | |
Re: Are you running this on a Windows Server? | |
Re: As soon as you send any HTML or echo anything to the DOM you can no longer do a header re-direct or you will get this error. header( 'Location: admin.php' ) ; Cannot go where you placed it. On a security side not, I would never use $_REQUEST, use the … ![]() | |
Re: If you're appending the element to the form it should be available on your POST without any further action. How are you adding the additional element? | |
Re: No one is going to write this for you, if you need help with specific code than we can help. There is a lot of free knock off versions written in jQuery and JavaScript. You won't find a pure PHP Chat | |
Re: I think I understand what you're trying to do. $raw_text = trim($file['description']); if(strlen($raw_text)>200) { $raw_text = substr($raw_text, 0, 200) . "..."; } $final_text = str_replace('*', $file['field2'], $raw_text); echo "<p>$final_text</p>"; | |
Re: You're missing the = in your password field name property. You have: <input type ="password" name'p' /> Should be: <input type ="password" name='p' /> | |
Re: Based on this code you can have several different ID's but only one upload form. How is the user picking which veh they are upload the photos for? You just need to add a hidden form field to your form once you know `<input type="hidden" name="veh_id" value="<?= echo $row['id']; ?>" … | |
Re: You want to show a different image depending on which item is selected from the drop down list? Do I understand you correctly? | |
Re: Should just need to remove the echo "</table>"; from within your while loop, put it just fater your closing bracket as urtrivedi suggested. What's happening now if you view sorce you'll see that at the end of each row there will be an </table> and no new table started. | |
Re: scandir returns an array of all files and directories. You'll need to verify the file is a file and not a directory as it stands right now you're trying to file_get_contents on directories which will fail. | |
Re: Check your error logs, there is an error in your PHP which will cause the page to appear blank. It can be a lot of adifferent things so best to refer to your error log to see what it says. | |
Re: I answered this question for you in you're other topic should do what you're looking for | |
Re: Your form has name="email" but script has $_POST['Email'] make sure both have the same capatalization. Change your regex expression for strings to: `#[^a-z .'-]#i` And for numbers: `#[^0-9]#` ![]() | |
![]() | Re: Because you have defined a constructor for the child class the parent constructor is not implicitly called. When you define a constructor you must construct the parent to make the functions available to it: function __construct($coworker_name) { parent::__construct(); $this->set_name($coworker_name); } ![]() |
Re: With whats given I don't know what your initial object variable is (what your var_dump'd) so I'll just use $objVar for demonstration purposes. Easiest way is to work backwards from what you want. So for example the id. We see it's keyed as id so we write that down. Step … | |
Re: Is this code tossing an error? Security issues aside, nothing is jumping out at me as being wrong ![]() | |
Re: `$query = $this->db->where('id',$id);` That's actually correct, it's part of the Active Record driver for the DB. The $id variable is loaded from the URI websitename.com/folder(optional)/class/function/variables So if you were to goto for example websitename.com/entries_model/get_comment/12/ CI would basically interpurate that as load the Entrie_model class, run the get_comment function and pass … | |
Re: The easiest way is can hide all than re-display the one you want: function handleSelection(choice) { document.getElementsByClassName('hide').style.display="none"; document.getElementById('select').disabled=false; document.getElementById(choice).style.display="block"; } | |
Re: When using jQuery, the $('#game') selector selects ALL elements with the game ID and does not give you the actual DOM element to allow you to do this. jQuery exposes the actual DOM elements by numeric index to allow regular DOM/Javascript functions: `var canvasElm = $('#game')[0];` | |
Re: This is why we don't copy and paste something from W3C lol... There is a lot of security issues with what you've posted. you should never take user inputted data and insert it directly into the database without verifying it first and you shouldn't store unencrypted passwords in your database. … |
The End.