Jump to content

Search the Community

Showing results for tags 'new'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 20 results

  1. Hi there, what I have been trying to do is add some additional logic.. My problem is I want to stop displaying the month and day after the year 2000? I know I need to add an if and else statement but this is my first actual project and I am a little stuck.. here is the page, it's a plugin for a timeline http://www.llandoveryheritage.org/project-timeline/ And the file is attached below.. any help would be appreciated. The plugin code was too long to just post in here, didn't want to cause any slow loading issues for people on a slow connection.. Thanks and I appreciate any help. annual_archive.php
  2. Hi Folks! New to php and introduced into it by a new found friend who is really into php. Been learning and learning and learning but not so much I am afraid. I guess books and youtubes and other tutorials are not enough so here I am, fearlessly venturing into this forum and I hope to learn much more to all ya pros out there err I mean in here. Be gentle to me please. I am not a coder but I do have logical thinking attitude and habit. I am a slow learner and close to the resignation age. But who cares, I wanna learn php, yeah!
  3. Greetings and Salutations, Everyone! I like to play around with PHP. I started about a decade ago... All that time and you'd think I'd be a pro by now (not even close)! I was on my way to PHP & MySQL glory when life happened and I didn't code consistently or in a dedicated fashion for something like 8 years. This has left me shamefully beyond rusty. (New HTML & CSS has come around, too. I've recently gone through some refresher courses for those languages.) Anyway, I've decided to get back into it. I'm here because I'd like to re-learn and expand my knowledge of PHP. I'll probably ask a bunch of silly questions. I apologize in advance! cheers, echo
  4. I am new to website development. I can't figure out how to open a new tab for the following javasript. I went through related questions but nothing worked for me. I want the browser to open a new tab when someone clicks on the link (example.com) below. The code target="_blank doesn't work here... What code should I add and where should I place that code? My html code is here - <section id="work-grid" class="site-inner"> <div class="work-item" data-groups='["all", "webdesign"]' data-url="http://example.com"> <figure class="image-container"><img src="images/work/web-one.jpg" /></figure> </div> Thanks in advance.
  5. Respected Users, Few days ago i created a bot site regarding auto comment and response comment etc. but whenever i try to login there using my facebook id and password an error shows up "Login Session Expired". The Problem is with the login script, i am unable to find that errorIts my humble request to you, kindly go through the post and fix me the problem. If u need anything regarding this Error kindly Msg me. Sorry for my poor English. Login PHP Code Posted Below: code removed
  6. I come from a .NET world. Now entering these frigid php waters. I found an example that got me a little confused. Of course, I am trying to apply OOP fundamentals to this php code but it doesn't make sense. This is the class i am talking about. <?php namespace app\models; class User extends \yii\base\Object implements \yii\web\IdentityInterface { public $id; public $username; public $password; public $authKey; private static $users = [ '100' => [ 'id' => '100', 'username' => 'admin', 'password' => 'admin', 'authKey' => 'test100key', ], '101' => [ 'id' => '101', 'username' => 'demo', 'password' => 'demo', 'authKey' => 'test101key', ], ]; public static function findIdentity($id) { return isset(self::$users[$id]) ? new static(self::$users[$id]) : null; } public static function findByUsername($username) { foreach (self::$users as $user) { if (strcasecmp($user['username'], $username) === 0) { return new static($user); } } return null; } public function getId() { return $this->id; } public function getAuthKey() { return $this->authKey; } public function validateAuthKey($authKey) { return $this->authKey === $authKey; } public function validatePassword($password) { return $this->password === $password; } } Alright, it's obvious to me that in the method findByIdentity($id) all it's doing is creating a static new instance of User. This is the first thing that caught me off guard. In .net you cannot create an instance of a static class. Now, moving on. in that line return isset(self::$users[$id])? new static(self::$users[$id]) : null; the second thing that intrigues me is the following. Since all you have in that array is a key/value collection.... private static $users = [ '100' => [ 'id' => '100', 'username' => 'admin', 'password' => 'admin', 'authKey' => 'test100key', ], '101' => [ 'id' => '101', 'username' => 'demo', 'password' => 'demo', 'authKey' => 'test101key', ], ]; how does php determine that it has to create an User object? Reflection? Which leads me to the next question.... looking at the class that it inherits from, Object, in the constructor, there's in one parameter which is an array (one of the elements of the array above). public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } BUT, this class in its constructor, is calling Yii::configure($this, $config) and in this method, the way I see it, Yii is adding to $this (the Object instance I am assuming, not the User one) the parameters that belong to User. public static function configure($object, $properties) { foreach ($properties as $name => $value) { $object->$name = $value; } return $object; } Seems to me like it's adding parameters dynamically to Object which will be accessed by User via the matching parameters. Makes sense? From my .net standpoint, $this in Object refers to Object instance itself, not to the User instance inheriting from it (like my friend says). I told him that's a violation of basic OOP principles and it's simply impossible. Anyone that could make me understand about this? Thank you.
  7. Hi there! I'm Sean Michael from Indonesia (currently). I'm a new PHP programmer (not sure if I can call myself that yet), and I'm new here in PHP Freak. Not sure if I can contribute anything useful here, but I will if I can. Nice to meet you all. Cheers.
  8. Just wanted to say a quick hi to you all. I have a fairly good grasp of procedural scripting with php but have been struggling with the object oriented side of things for longer than i care to remember. Time to get to grips with it and found a good tutorial here so thought i would join. Cheers all Graham
  9. Hi there, My name is Raymond and I am 29 years old and live in the Netherlands. I am a beginning student of the major "ICT" and came across this forum about PHP (and other languages) in which I am interested in to learn. I hope this forum will give me great input and support whenever I get stuck in my code writing. I already had a couple of classes and finished a couple assignments with PHP. So I quickly realized I could use all the support I can find
  10. I am new to the forum and just starting to learn about mysql and php. It's awesome.
  11. Hello all, I just have to start by saying i am very much new to PHP. Iv only done basic things but would really like to learn more. I am also new to forums so please try see past my "not so bright" moments and help. I have to build a interactive calendar. People who visit the website will select days they would like to rent the flat for. This will then make those dates unavailable for other people, so they shouldnt be able to select it. The cost of the flat will change according to date (Jan-dec : December being more expensive for christmas etc.) Rates will also influence the cost. Is there some sort of tutorial or site i could visit that will show me how to do this? Or does any one maybe know how to help me? I am quite despirate for help and information. Being the noob isnt exactly awesome. Please, please, please help me - Anything will help
  12. I'm currently studying IT and I'm a beginner with PHP and MySQL. Though I want to make a registration form for a school. The registration form consist of three parts (basic info, address info and courses info). The MySQL database will consist of four tables (users, addresses, users_has_courses and courses). The goal for this registration form is to record all inscriptions in MySQL and maybe into a Excel. My idea was to store all data into a session, when the registration is complete, the user can confirm and all the data should be read into the MySQL. This insertion would include 1 write to users, 1 write to addresses and multiple writes to users_has_courses. This form will be used on the registration day, so I expect around ten computers handling the registrations. What happens when some users press the button at the same time? If they are all asking for the next unused ID, they will all select the same ID and write to it? What if I plan to write to a MySQL and Excel after each other, will Excel get the same problems? Thank you!
  13. Hello! I'm a programmer from a long time back, got laid off in the IT meltdown in the late '90s/early '00s and since I had effectively coded myself into obsolescence by staying at the same desk for way too long, I ended up taking a completely different career path. I'm now getting back behind the keyboard, and it's a whole new world out there! I hope my questions aren't too trivial at this point, and I look forward to meeting you while I expand my expertise to the point where I will be able give back as good as I get. Ohms
  14. I'm not really sure where to post this topic... it touches on MySQL, PHP, Javascript, and best practices. I want to force users to update their password after 90 days. I can force them to the update page no problemo, but I'm having troubles forcing them to pick a new password, something different than what they have already stored in the database. Currently when a user registers for an account on my site, the password is passed in plain text and I let the MySQL Password() function hash it (I've come to understand this is bad practice). This makes it kind of difficult, because I am having a hard time verifying their new, plain text entry on the update page to the Password() hashed old one. The closest I've gotten is this: <script type="text/javascript"> function newpassword() { var oldpw = "<?php echo $XXXXXX->UserPassword; ?>"; var newpw = "<?php echo '*' . strtoupper(sha1(pack('H*',sha1('<script type="text/javascript">document.write(document.FORMNAME["UserPassword"].value);</script>'))));?>"; .... </script> And I would then compare the two variables. I'm wondering if this is even possible. I've seen a few suggestions online using UNHEX or CryptoJS, but when I use those functions my page loads with nothing on it. I've thought about passing the value as a md5 hashed value, and just storing that in the database instead, but I've read a bit that md5 isn't very secure anymore. I'm kind of at a loss of what to do at this point. Any help/guidance?
  15. Hello peoples. Right, what I'm trying to do is; you fill out a form that generates a HTML page (done with no problems) but you want to preview it before. So essentially, what I'm trying to do it submit a form, but opening another window in doing so, meaning that the entered information on the 1st page stays the same. Here's the code I'm trying: <form action="store_it.php" method="post" id="contact"> <fieldset> <label for="name" >The title of your page:*</label> <input type="text" name="name" value="<?php echo $name; ?>" placeholder="My project" id="name"> <br><label for="body" title="You may use HTML code in this box">The text for your page:*</label> <textarea onfocus="window.lstText=this;" name="body" value="<?php echo $body; ?>" id="body"></textarea><br> <input type="submit" value="Submit" name="submit" class="button" id="submit"><br> <input type="submit" value="Preview" onclick="window.open('store_it.php')"><br> </fieldset> </form> - Thanks, Xanco
  16. Hello, I'm new on this site and I want to introduce myself. Name: Dylan. Age: 13 years old. What I am: Web developer, Gamer Sex: Man For all the web developers that work with PHP, HTML, CSS and JS I wanted to ask if him/her want to help me with my site. It's a big project and I really can use a little bit of help. It's a gaming site, I already have the ideas, some PHP apps and the layout. If u want to help leave a comment with your: Name, (Skype Name) and your Email. If u want to help also put this in your post: "Helping MrDev." Thanks for reading.
  17. Hi, I'm trying to get my first lines in PHP. I have read some tutorials, but since I'm not a programer is a little hard for me to get it straight. Could someone help me out to put the following javascript into php so I could just call php from my HTML, something like MySelect and get the selector. <h3><font color="#3EA99F">Categories</font></h3> <select id="mySelect" onchange="if(this.options[this.selectedIndex].value != ''){window.top.location.href=this.options[this.selectedIndex].value}"> <option>Select an option</option> <option value="site1">Orange</option> <option value="site2">Pineapple</option> <option value="site3">Banana</option> </select> Thank you so much More Explanation: I want to have something like MyFile.php where I have definied the Selector, so I can call MySelect from Index.html and write the select in the html, so If I have 400 .html pages, I do not have to change the code in the 400 pages if I want to add a value or make any change, but just made the change in MyFile.php.
  18. Dear PHPFreaks, Nice to meet you all! It is my first time right now on this nice communication full website. My technics are: -ASP.net -PHP -HTML5 -MySq -CSS 1 till 3 and a lot of more stuff! Regards, Mrbagino
  19. I've just started learning PHP from youtube videos and I'm looking for a friend who's willing to learn so that we can share resources. I think this forum will help me.
  20. please i have an error message as viz(Notice: Undefined variable: select in C:\xampp\htdocs\interest.php) running this code <?php //lets select options from a dropdown list using php functions $month = array("jan" => "Jan", "feb" => "Feb", "mar" => "Mar", "apr" => "Apr", "may" => "May", "jun" => "Jun", "jul" => "Jul", "aug" => "Aug", "sep" => "Sep", "oct" => "Oct", "nov" => "Nov", "dec" => "Dec"); $default = "jan"; $select = generate_menu("month", $month, $default); function generate_menu($name, $month, $default="") { $select .= "<SELECT NAME=\"$name\">"; <<<<------- this is where the error is located foreach($month as $value => $label) { $select .= "<OPTION "; if ($value == $default) $select .= "SELECTED "; $select .= "VALUE=\"$value\">$label</OPTION>"; } $select .= "</SELECT>"; return($select); } ?> <FORM ACTION="month.php" METHOD=POST> <?php print $select;?> <INPUT TYPE=SUBMIT VALUE="Continue"> </FORM>
  • 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.