- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 16
- Posts with Upvotes
- 16
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I was 11, my father gave me a book on BASIC and I've been stuck in this digital world ever since.
- Interests
- soccer, chicago sports, sleeping, programming, blacking out
- PC Specs
- Dell all day
51 Posted Topics
Re: be sure to include: error_reporting(E_ALL); at the top of your page to ensure error reporting is turned on. also, i notice in your HTML for the Phone Number and E-Mail Address that the input boxes are not closed. <tr> <td>Phone Number:</td> <td align="right"> <input type="text" name="phoneNumber"</td></tr> <tr> <td>Address:</td> <td align="right"> … | |
Re: be sure to turn on your error handling <?php error_reporting(E_ALL); ?> you can also try <?php header("Location: http://www.yoursite.com/index.php"); ?> | |
Re: In general it's best practice to use isset to make sure that your variables actually exist. I ran into this same exact problem months ago and it was a great learning experience. | |
Re: If you can pick up PHP or Java, you can learn HTML in a matter of hours. Today is not about knowing 1 language, but being comfortable with multiple ones. I'm 25 with a History degree and make just under 100k programming PHP/MySQL/HTML/CSS and a little Java/AJAX/jQuery. No stupid Comp … | |
Re: Pretty sure you need single quotes wrapped around all of your INSERT Values. | |
Re: i hate people who copy/paste code, and when it doesn't work, post it to a forum instead of trying to solve it yourself. to View usernames [code] $result = mysql_query("SELECT * FROM users"); while($r = mysql_fetch_array($result)) { echo "$r['full_name']<br>"; echo "$r['username']<br>"; echo "$r['password']<br>"; } [/code] You did not provide your … ![]() | |
Re: you forgot a semi-colon on line 2 [code] session_start(); [/code] | |
Re: Your forms action is set to Login.php, which is the form page. All and all this looks really mixed up. Set the action to loginhome.php. | |
Re: You can access WAMPP by going to [url]http://localhost[/url] in your web browser. This will give you all the basic information on your WAMPP install. A basic PHP MySQL connection looks like this: [code] <?php //*** config.php ***// mysql_connect('localhost','username','password'); mysql_select_db('database_name'); ?> [/code] A basic MySQL query is: [code] <?php include('config.php'); $sql … | |
My program is a simple client database that holds information on tenants. Each tenant has a LONGBLOB column called 'notes' to hold updated information on them. For tenants that have a long list of notes, when the form is submitted the site actually goes to a 404, so their profile … | |
Re: Please post your PHP code so we can lead you in the right direction. ![]() | |
Re: Undefined index errors normally come from variables being called for but don't necessarily exist yet. I edited your code: [code] <?php $drinks = $_POST['drink']; //here is your error, change to: if(isset($_POST['drink'])) { $drinks = $_POST['drink']; $drink1 = $drinks[0]; $drink2 = $drinks[1]; } if(isset($_POST['first_name'])) { $first_name = $_POST['first_name']; } } else … | |
Re: Page with the form: [code] <form action='data_page.php' method='post'> Username: <input type='text' name='user'><BR> Password: <input type='password' name='pass'><BR> <input type='submit' value='Login'> </form> [/code] Page that accepts the form data: [code] if(isset($_POST['login'])){ $user = $_POST['user']; $pass = $_POST['pass']; if ($user == "Enter" && $pass == "12345"){ echo "Access Granted"; }else{ echo "Access Denied"; … | |
![]() | Re: Read over your table structure again, so yes, comment_id will be your page_id, but since the names are a little confusing I'd change it from comment_id to page_id. |
I'm having some trouble collecting data between 2 different years (ie: December 2011 & January 2012). This is a timeclock system where punches are stored as: DD-MM-YYYY (31-12-2011). I want to be able to search for dates between: DD-MM-2011 through DD-MM-2012 but am coming up empty. When using the same … | |
![]() | Re: Please post some code so that users can help guide you. Don't expect anyone here to do your job for you =) ![]() |
Re: First off, welcome to the utterly miserable world of the Windows Server Environment. I struggled with this same exact issue, and spoke to one of my Networking guys here at work. It ended up being an issue with the ACL, and our Network guy had to add an exception on … | |
Re: jacob, you'll need to format the text before you input it into your db, which can be done in a few different ways: [code] if(isset($_POST['textarea'])) { $textarea = mysql_real_escape_string($_POST['textarea']); } [/code] OR [code] if(isset($_POST['textarea'])) { $textarea = addslashes($_POST['textarea']); } [/code] Depending on how secure you need to be. Complete the … | |
Re: they probably used a mysql injection. clean up your php code. those guys aren't hackers, they're little script kiddies who manipulated your code. they didn't brute force their way in. your site was hacked because of your own code. | |
Not sure if this is a PHP problem or IIS7 issue: My form is used for editing client information, and it has worked flawlessly for the last year until now. Some clients have more "Notes" about their file than others, and recently clients with a lot of "Notes" have been … | |
Re: the exact same thread 3 times in a row? ::cough:: ban ::cough:: | |
Re: knottykings, Please post your: Login, Logout, 1 "user only" page codes | |
Re: Very easy to do. What's funny is that sending a text message is no different then sending an email. Though depending on the provider the "address" changes a bit, but this tutorial will give you all the information you need! David Walsh's SMS with PHP - [url]http://davidwalsh.name/send-text-message[/url] | |
Re: Zero, [code] while($genre=mysql_fetch_array($sql)) { echo "<OPTION value='$genre[id]'>$genre[name]</OPTION>"; } [/code] This should be changed to: [code] while($genre=mysql_fetch_array($sql)) { echo "<OPTION value='$genre[name]'>$genre[name]</OPTION>"; } [/code] The <option> tag takes the value (which you currently have as genre[id]. Hope I understood you correctly. | |
Re: All you really should have to do is create an iframe box on planet.com, and have the iframes src tag reference your jupiter web site. IFrames are used to load data/information from an entirely separate site that is normally hosted on a different server. | |
Re: I don't think you HAVE to make it that complicated with an algorithm. Instead, you could try using PHPs str_replace() function, where if a string "possesses" the keyword, add some css styling to it. str_replace('haystack', 'needle', 'replace with what'); [code] $keyword = "awesome"; $string = "This website article is awesome!"; … | |
Re: Zero, for something like this, you'll start learning MySQL Operators. [code] SELECT * FROM actiongames ORDER BY RAND() [/code] If you want to designate how many rows to gather [code] SELECT * FROM actiongames ORDER BY RAND() Limit 5 [/code] Hope this helps! | |
Re: This sounds like it will be very tricky considering not all emails are going to work the same (does gmail and yahoo function the exact same way?). The PHPMail package does give you the ability to do smtp logins (even if password protected), but you'll need to really know the … | |
Re: There are a lot of things you need to change with this code. Since this is a login code, you have 2 main goals: security & security. First, when accepting $_POST data, make sure you verify it. [code] if(isset($_POST['username'])) { $username = mysql_real_escape_string($_POST['username']); } [/code] You need to do the … | |
Re: 1) you can't 2) You need to setup $_POST (or $_GET, depending on the method you use) variables to receive the form data, then have it connect/insert the data into a mysql database, and then put a while loop in your team_roster.php page that selects all the rows from the … | |
Re: Are you just copy and pasting random bits of code together? You have bad syntax all over the place, so first things first you need to clean up your code (closing PHP and then the following line re-opening it...) If you are trying to use multiple pages, Google "php pagination", … | |
Re: Referencing madCoder's query suggestions. [code] 1. SELECT * FROM request_table WHERE request_id = 'request_id' 2. INSERT INTO friends SET friend = 'friend_name' WHERE user = 'person_adding_friend' 3. repeat step 2 with reversed vars 4. DELETE FROM requests WHERE request_id = 'request_id' [/code] These are very basic queries, considering that you … | |
Re: There is no SDK for Windows OS, the only way would be to run a Mac OS in VMWare on a Windows based machine. Also, chances are you'll have to re-write your application in C/C++/Java since you want to have an actual application. Why not just write a mobile-version of … | |
Re: Agree with pritaeas...you have a ton of problems all over the place. Did you just copy and paste this code from somewhere else or did you actually write this yourself? What is this function supposed to do? Starting from line 8 through 12 you have bad syntax. | |
Re: I agree with ardav, htmlentities is the way to go. I recently had to use this function myself for the first time and consulted W3 Schools for some examples: [url]http://www.w3schools.com/PHP/func_string_htmlentities.asp[/url] Hope that tutorial helps you as much as it helped me! Also, don't forget to check php.net for an extensive … ![]() | |
I've literally copy and pasted a basic AJAX function from W3 Schools, and for some odd reason it refuses to work on my site...please help. Here is my HTML: [code] <select name="address" onChange="sortAddress(this.value)"> <option value="" selected="selected">Building Address</option> <?php $sql = "SELECT DISTINCT name FROM buildings ORDER BY location"; $result = … | |
All I am trying to do is place the marker number in the map. I was able to do this with V2 of Google Map API, but now I have not a clue how to do it in V3. I've exhausted Googling this issue, and now come to my favorite … | |
Re: The error means your query is not returning any rows. Make sure that your query is correct, and that your database connect information is also right. These errors usually stem from the database information being wrong, or you mistyping the table name. | |
I'm really no JavaScript expert, and I have absolutely no idea what exactly is causing this error. I am using a Photo Gallery script called Galleria which uses jQuery/JavaScript to display photos. On my index page load (only in Internet Explorer), a message box pops up saying "Message from Web … | |
Re: The best way to learn is through trial and error. Think of projects that you want to create, and read up on how to create them. DaniWeb, Google and PHP.net will become your best friends. I tend to stray away from text books, as they do not teach you how … | |
Re: It's very bad practice to input raw $_POST data in your URLs, this can be subject to MySQL Injection. You should be capturing/sending your $_POST values as such: [code] if(isset($_POST['var'])) { $var = mysql_real_escape_string($_POST['var']); header("Location: mypage.php?value=" . $var . ""); } [/code] With the above code, you capture $_POST['var'] only … | |
I am building a Leasing Company Property web site, and one option they'd like is to have "Similar Properties" recommended to the visitor. The array contains "Bedroom Type" data (studio, 1 bedroom, 2 bedroom, 3 bedroom). A sample array is: Array ( [0] => Studio [1] => 1BR ) I … ![]() | |
Re: Not sure if you've looked into either of these functions, but maybe str_replace() or strpos() could be of help to you. strpos: searching for a string within a string - [url]http://php.net/manual/en/function.strpos.php[/url] OR str_replace: [url]http://us3.php.net/manual/en/function.str-replace.php[/url] hope either of these functions can help. post again if you need explanations relating to your … | |
My table has 4 types of "r1": 'Standard', 'HD', 'HD + DVR', 'None' There are 3 types of "status": 'NTC', 'Repair', 'In Progress' All I am trying to do is retrieve all of the rows where r1 = 'Standard' and matches all three of the "status": [code] SELECT * FROM … | |
I've been at this for about a week now, and still can't get my Google Map to properly number the markers. Any help would be greatly appreciated. I've done enough "googling" on the subject matter, and finally needed to make a forum thread. My JavaScript code: [CODE]<script type="text/javascript"> function load() … | |
Re: After trying your code, the only issue I found was here: [code]$psection=$_REQUEST['section];[/code] Should be: [code]$psection=$_REQUEST['section'];[/code]; My test files: 'links_to_pass.php' [code]<?php $id = '1'; $pcode = 'pcode'; $pname = 'pname'; $psection = 'psection'; echo "<tr><td><b>click</b></td><td> <a href=test.php?id=$id&code=$pcode&name=$pname§ion=$psection target=\"_blank\">Click</a></td></tr>"; ?> [/code] 'test.php' [code] <?php $pid=$_REQUEST['id']; // values getting $pcode=$_REQUEST['code']; //values getting $pname=$_REQUEST['name']; … | |
Re: If you're trying to display XML data on an HTML page (the file extension is .html), this article will help you: [url]http://www.w3schools.com/xml/xml_examples.asp[/url] For starters, if your page is not a .xml, you can't start the page with [code]<?xml version="1.0"?>[/code] | |
Re: If you're planning on storing md5 data as your password, you need to set your varchar to a higher integer. Pretty sure md5 are 30+ character strings, so change it to varchar(40) and you should be safe. | |
Re: Depending on where your dbconfig file is saved, you may want to change: [code]include ("/dbConfig.php");[/code] to: [code]include ("dbConfig.php");[/code] If your connection to the database is rejected, it's either your include line, or your sql connect information is wrong. ![]() | |
Re: To follow up with ardav, you should always check to make sure the variables are actually set. With that, make sure the <form method=""> you are using is the same as the php method ($_POST,$_GET,$_REQUEST). [code] if(isset($_GET['title'])) { $title= mysql_real_escape_string($_GET['title']); } if(isset($_GET['firstname'])) { $firstname= mysql_real_escape_string($_GET['firstname']); } if(isset($_GET['surname'])) { $surname= mysql_real_escape_string($_GET['surname']); … |
The End.