- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
53 Posted Topics
I have created a table in a mySQL DB where users are going to a form and entering ratings on 6 Categories (5 Specific and 1 Overall) for a particular item_id. On the item table, I have a column that calculates the total number of ratings this particular item_id has … | |
I'm not sure if this should be in this forum but I figured it was a good starting place. I am creating a database that, among other things, allows users to input a store's location (e.g. name, address, etc). Once a store has been added, there is an ability to … | |
So I'm getting this error message from MYSQL when I load this page. The first message is what's it displaying on the PHP code, the 2nd message is the result of mysql_error(). [ICODE](1) Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in [I][redacted][/I] on line 19 (2) You … | |
I am trying to secure a folder within my site by forcing an HTTPS connection when anything in this folder is run (the folder contains a series of scripts that process registrations, password resets, etc). What's the easiest way to accomplish this? | |
I have a javascript login box on my site ([url]www.cigardig.com[/url]) that a user can click on and login on any page. The way I would like it to work is that once a user hits submit, they are redirected back to the page they logged in on. So, for example, … | |
I'm trying to figure out the best way to accomplish the computation of weighted averages for my site. Here's the PHP that pulls down the results -- [CODE]$SQL = "SELECT a.*, b.CName, c.Description FROM humidor a LEFT JOIN cigar b on a.CigarID = b.CigarID LEFT JOIN cd_manufacturer c on b.Manufacturer … | |
Re: [QUOTE=mgt;1595633]I'm trying to create a simple members only section. With the following code, I'm able to log in and get redirected to a page (that simply says: "hello") if the login is correct. If I then copy the URL from the page to which I was redirected, open up IE, … | |
Re: I personally find it easier to assign roles by using a RoleCD in the user table and then assigning different capabilities based on that RoleCD. That will prevent you from needing two separate tables while still ensuring that only Administrators/Supervisors are seeing the appropriate functions. Just my 2 cents....;) | |
I am trying to figure out the best way to figure out "age" of a particular item. I currently have fields in a mySQL databases that are stored as datetime formats and I need to display (in PHP) the relative age of those dates in terms of years, months, and … | |
So I am in the process of putting some finishing touches on a new section of my website which allows users to keep track of their cigars in an online inventory (or humidor) type system. I'm kind of stuck; however, on what the best way to capture and process data … | |
Re: No, mySQL workbench is just a GUI tool that helps primarily in database design and also, in some cases, as an external editor. I use it primarily to design and layout a given database and then use another 3rd party GUI for interfacing with the database. But, in no means, … | |
I'm trying to figure out the best way to replace apostrophes in various user input which is all formatted first using [B]mysql_real_escape_string[/B]. Of course this replacement should take place after all input has been sanitized and anything funny removed. :) Any help would be awesome! | |
For my new code that I'm developing, I have a text box where a user will type in a date as follows: [B]MM/DD/YYYY (e.g. 05/19/2011)[/B] This date then needs to be converted and inserted into a date/time field on a mySQL database. I've been trying to play around with this … | |
Re: From what you've posted, the javascript your executing isn't calling the SQL queries to actually perform the update. You need to include something in your javascript to call those queries (or PHP file). It should look something like this: [CODE]xmlhttp.open("GET","updatefile.php",true); xmlhttp.send();[/CODE] | |
I am in the process of trying to customize my site's URLs and I'm running into an issue with my htaccess file, specifically the newest one I am trying to add. Here's the file -- [CODE]RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA] RewriteRule ^/retail/(.*)$ retail.php?id=$1[/CODE] … | |
Any chance the wonderful people here on daniweb could help me again with a loop? My apologies, loops are not my thing :| Basically what I'm trying to do is add a condition where on the last tweet (that is where the loop = $nooftweets), that tweet gets a different … | |
So I'm trying to create one central file for my navigation which is used across my site; however, some of the pages are in different directories. So, for example , let's say I have the following directories -- domain.com/ domain.com/dir1/ domain.com/dir2/ If I wanted to use the same include between … | |
I've been having a reoccurring issue with my VPS since I moved to a new company and I'm trying to figure out what the issue is. There are a few different things going on (I believe they are all connected) -- [LIST=1] [*]When you visit a page that doesn't exist, … | |
So I'm trying to figure out the best way (if possible) to combine these two stored procedures. Basically these are the same, the only difference is one is looking at a 'Spot' table, the other is looking at the 'Retail' table. However, in both cases the column count is the … | |
So I've developed some code to pull the latest 8 images from my flickr feed; however, I'm having trouble with figuring out how to do what I'm trying to do. Essentially, I need each 4th image to have a different <div> class (this helps with margins and what not). Any … | |
I am having a problem with the Google Maps API because of conflicting names in my site's CSS. From what I've been able to find, Google Maps uses the name "container" in their code as does my site, so when the map loads it has this nasty white shadow behind … | |
I’ve created a dynamic page ([I]page.php[/I]) who’s content changes based on the incoming link, specifically by calling a GET on the ID in the URL. So, for example, someone visits [I][url]www.domain.com/page.php?id=310[/url][/I] and the content on the page changes queries the database and returns results for item 310. I’m in the … | |
I recently moved a script I created for Google Maps over from my development site and I changed the information in the mysqli line and now I'm recieving an error mesage -- any idea what's going on here? Here's the error message: [CODE]Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user … ![]() | |
Re: What you have listed is going to call the entire index.php file, not just the session, which is why you see everything duplicated. If you are just looking for the session part, just put the following code at the top of the mem_accnt.php [CODE=php]<?PHP session_start(); ?>[/CODE] That will pick up … | |
I want to add something to the script below that, prior to insert, check to see if the $CigarID already exists for the $UserID. If so, I want it to do an update and increase the $Quantity by whatever the user inputs. If the value doesn't exist, then insert the … | |
Let's say I have the majority of my site in the 'root' WWW directory on the server, such as: [url]www.domain.com/index.php[/url] My current header & footer files are set to respect this configuration and work beautifully. I am now in the process however of creating a new directory which will be … | |
So I'm trying to figure out the best way to go about setting up an image upload system for my site. Basically we have, let's say, 2,000 stores in our database currently (that number expands by the day). I want users to be able to upload images for each store … ![]() | |
So this may be a bit of a stupid question but I'm not sure I'm understanding this completely. Currently, my site uses sessions to store username and a UserID across the site; however, the session lacks the ability to remember a user should they close the browser. I want to … | |
I am trying to write a script for my site that will check if a user has submitted a review for a particular cigar in the past [B]30 days[/B] and if they have, prevent them from creating a new review. I am trying to figure out the code but I'm … | |
I keep getting the following error whenever I try to run this query on my "spot" table: [CODE]#1054 - Unknown column 'a.Longitude' in 'field list'[/CODE] The weird thing is though that the column DOES in fact exist, is spelled the same way, and has thousands of rows of data. Even … | |
Ok, I currently have three different pages in play here. [LIST=1] [*]Cigar.php - This is the individual cigar page, dynamically generated based on a GET Value [*]Cigarreview.php - This is where a user goes to review a cigar. It has a drop down menu that pulls from the DB and … | |
I have a large amount of items stored in my DB (around 3,000 total and growing) and I have a list of them sorted alphabetically that displays on a page. I was interested; however, in having the items display in blocks instead that look something like: [INDENT][B]A[/B] [All items that … ![]() | |
I am in the process of trying to create a search option for my database; however, I need the user to be able to submit one search which looks at three tables in the database. I'm using the following right now and it's working for each individual one (I have … | |
Re: Give this a try: [CODE]echo "Player: (".$myusername.") Login Successful"[/CODE] | |
I have a question regarding Google Maps integration I am planning for my site. Right now I have a list of approximately 5,000 addresses (Street Address, City, and Zip Code). I would like to add two columns to the table these address are stored in for Longitude & Latitude so … | |
Re: You don't need to concatenate your Update statement, try something like this: [CODE=PHP]$updateThis = "UPDATE user SET memberAddress = '$theValue' WHERE memberID = '$theUserID'";[/CODE] It also seems, based on what you have in the first post, you may be mis-labeling some variables? I'm not sure if this was just something … | |
My site is broken into three different categories (which are stored on 3 separate tables) and I am looking at creating a functionality to let a user upload photos. Ideally, I would like the following to happen: [LIST=1][*]A user is viewing a single retail store on the site, for example … | |
I think I'm having a blonde moment because I can't seem to get the bit of CSS/HTML working. When I make changes to the code such as cellpadding and cellspacing in the table attribute, it doesn't do anything to the form itself. I've even tried changing something like BGCOLOR and … | |
Re: Few questions for you; (1) Are the blogs in the same directory as the index page? For example, if you have [url]www.domain.com/index.php[/url], are the blogs at [url]www.domain.com/blogs/1.php?[/url] (2) I would imagine the blogs have some sort of postID and/or blogID? If so, can you tell us which they have. (3) … | |
I've been messing arround with this for the past little while and I can't seem to figure out the best way to to about doing this. Essentially, I'm trying to create a three part statement. The first will check is a session variable isset & the user has a rolecd … | |
Re: Just to clarify, are you talking about the image changing while the user is on the page or when they come back to the page? The former would better handled in Javascript and to be honest, I'm not even sure PHP could do something like that since the code is … | |
Is there anyway to format Phone Numbers and/or Web Address [U][B]PRIOR[/B][/U] to inserting them into the database? For example, let's say a user puts one of the following telephone numbers into the box: (777) 111-2222 777-111-2222 777.111.2222 7771112222 I would like these to be stored in the database as: (777) … ![]() | |
Re: One option to consider is storing a unique UserID in the session as opposed to something that could change. Doing so will allow you to populate any field (including e-mail address) while ensuring that if changes are made you don't have to destroy the session. | |
Re: If I understand you correctly, you are trying to populate a drop down list from your database? If so, try this: [CODE=php]<select name="xx" value="xx"> <?php $con = mysql_connect('localhost','root',''); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db('msansi', $con); $query = "SELECT * FROM provinces"; $result = mysql_query($query) or … | |
I am trying to create a page where a registered user can go, view the information from their profile, and update that information if necessary. I've started putting something together however it's inefficient in my opinion. Here's what I'm trying to figure out: [LIST=1] [*]Is there a way to check … ![]() | |
I am in the process of creating a website in PHP/mySQL and the next thing I wanted to tackle was creating an option for users to be able to upload a small avatar (maybe max of 50x50 let’s say). I’m not as familiar with how images are stored/retrieved in a … ![]() | |
We currently have a system that display multiple sections on one page when it loads. What we were looking at doing is breaking each section into an expandable/collapsable group that is controlled by the end user with all groups collapsed on load by default. In saying that, is there a … | |
I am creating a login script and I need to check that the username and e-mail don't current exist in the database otherwise it will print an error. I've tried the following but it's not working: [CODE=php]//Create Username Array $SQL = "SELECT Username from user" $Result = mysql_query($SQL); $Array = … | |
I have set up a DB which uses a Code table to store numerical values that correspond to a "Description" of the cigar. For example, a Cigar made in the Dominican Republic would be stored in the DB as being made in "80004." I'm not completely immovable on the Code … | |
Name: Joel Nickname: Joro - Which eventually became the name of my company Height: 5'11 Weight: 154 (Down 8 Pounds since 01/01!) :cool: Hair: Blonde Eyes: Hazel Location: Alexandria, VA Age: 25 Hobbies: Cigars, Technology, Movies, Music, Apple Products Relationship Status: Married Education: BSBA from East Carolina University, MBA from … |
The End.