
Bryce910
Members-
Posts
22 -
Joined
-
Last visited
Everything posted by Bryce910
-
I am a young php developer who also does pen-testing for websites and company's. I am looking for some people interested in getting their web applications tested for security flaws. I am doing this just for experience (so it is free). All i need is a comment in one of your pages giving me permission to do so. That proves it is your website and that I have permission. I do not mess with any data or functionality, all I do is test your website security and send you a report with what I find. I can also offer to fix the bugs I find. Looking forward to helping some people secure their websites!
-
Need help creating a signup for an event and a method for paying online
Bryce910 replied to danh30's topic in PHP Coding Help
Yes you will use php for the server side and then some html/javascript for the UI. -
When in OOP I have been watching tutorials and some have functions just written like class user { public $user; public function __construct($u) { $this->user = $u; } } do I need to type public before the function or is it better practice to just put class user { public $user; function __construct($u) { $this->user = $u; } } Thanks!
-
Is it bad practice to use $_COOKIE for your log in system and to protect your pages or would it be better to use $_SESSION? I have always used cookie but I am not sure if that is good practice
-
I can't get my select_query or my insert_query to work. Is it possible for it to be a problem with my version of xampp? The only PDO stuff that has worked is the connection process of PDO.
-
Did you create the database and table being used in the query? I'd guess your query is failing and ->query is returning FALSE rather than the statement object. That is what I originally thought but then I tipple checked everything and the query shouldn't fail. Since I am just selecting all from the table.
-
To my understanding if it wasn't return an array of information it most likely isn't returning anything at all and the query is empty?
-
I looked at that example and they do the same thing? I used this guide http://phpro.org/tutorials/Introduction-to-PHP-PDO.html to learn and I don't see any difference in that one either?
-
I am new and just learning PDO and already having some problems with very simple stuff <?php $hostname = "localhost"; $dbname = "PDO"; $username = "root"; $password = ""; try { $dbh = new PDO("mysql:$hostname;dname=$dbname",$username,$password); $sql = "SELECT * FROM users"; foreach($dbh->query($sql) as $row) { echo $row['id'] . $row['name'] . $row['email']; } echo "Number of effected rows:" . $count; } catch(PDOExecption $e) { echo $e->getMessage(); } ?> Can you tell me what in that code is making me get the error: Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\xampp\PDO\select_query.php and what I would need to alter to fix the problem.
-
Well I mean personally I code using my own style. But I have been told by many more experienced people that I need to use a public coding style like how pear has certain ways of doing the coding (line length,bracket placement, ..etc). So I was wondering if you guys have any suggestions other then PEAR.
-
I am looking to finally move to a popular coding style. Anyone know any great ones I should look into? So far I have looked into PEAR. Thanks!
-
I am new to java script and I am curious is it possible to have a java script function click when I hit a certain button on my keyboard. Like if I hit (space) it would run a java script function I have built?
-
okay sounds like I will start using PDO. I have used a little of it but I just already knew mysql_ so I went back to it. I will make sure I use PDO for now on.
-
I am curious if it is true that mysql_ extension is being depreciated in the next upcoming versions of php? Has anyone heard about if that is actually going to happen?
-
I am curious when you guys write php applications and you use OOP do you guys put all your classes in 1 file or do you separate each class into a different file? Which way is perferred by professional programmers?
-
I recent created www.confusinghomework.com. If anyone could take a look and give me some feedback that would be amazing. You can look and just design or functionality or even features. I am up for the criticism.
-
w3schools is a amazing site to learn basic coding for html/php/javascript/mysql. I used it when I was learning all the time.
-
There was no error on it at all. It also didn't run the else statement so I am not sure! Also so you don't think I should extend it but instead write another protection function in the questions class? Thansk
-
I am new to OOP php programming and I am trying to figure out what I did wrong on this. I am trying to call my protection() function in my users class, so I extended my question class and call the protection function but it isn't working. Here is my code for my class_lib: <?php require('dbc.php'); class users { public $email; public $password; public $first_name; public $last_name; public $id; function __construct($e,$p) { $this->email = $e; $this->password = $p; } function protection() { if(!$_COOKIE['user']) { header("location:../login.php"); } } } //new class class questions extends users { public $title; public $question; public $response; public $sub_category; public $date; public $pid; function __construct(){} function newest() { $sql = "SELECT * FROM math ORDER by pid DESC LIMIT 0,5"; $execute = mysql_query($sql) or die(mysql_error()); while($data = mysql_fetch_array($execute) ) { $this->title = $data['title']; $this->question = $data['question']; $this->pid = $data['pid']; echo '<p class="title">' . $this->title . '<br /></p>'; echo ' <br /><br /><br /><br /><a href="questions.php?id=' . $this->pid . '" class="button">Awnser it</a><br /><br /><br />'; } } } ?> Here is the page to call the function: <?php require('../class_lib.php'); $question = new questions(); $question -> protection(); ?>
-
What exactly is not working? I noticed how you have your code which includes a header() in the body tags which will cause header problems lots of the time. Also I would put name="submit" for the submit button and then put at top of file. if(isset($_POST['submit'])) { do the log in code... }