ChayaCooper
Members-
Posts
18 -
Joined
-
Last visited
ChayaCooper's Achievements
Newbie (1/5)
0
Reputation
-
One of my topics disappeared while I was responding to a question and when an administrator tried correcting the problem they accidentally merged it with another one of my topics. The topic which disappeared was about setting the path to config.php when it's in another folder. I temporarily posted a 2nd time about this in order to respond to the members who had been in the middle of helping me (the link to the 2nd posting is http://forums.phpfreaks.com/topic/271845-correct-way-to-set-path-to-configphp-in-another-folder/ ). That was then merged with: http://forums.phpfreaks.com/topic/271838-how-do-i-get-salt-when-its-in-the-configphp-file/ Can they be unmerged? If not, can you delete the posts? It's way too confusing for anyone trying to help me figure out a solution (let alone someone who's trying to read it in the future ;-) )
-
How Do I Get $Salt When It's In The Config.php File?
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
Did that :-) I added to the config.php echo ("test"); In 'demo folder' - debug.php <?php session_start(); error_reporting(E_ALL); require_once 'secure_folder/config.php'; ?> And when I go to http://www.click2fit.com/demo/debug.php it echos 'test' :-)- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
Correct Way To Set Path To Config.php In Another Folder
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
I'll do that :-D- 5 replies
-
- path
- config.php
-
(and 1 more)
Tagged with:
-
Correct Way To Set Path To Config.php In Another Folder
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
Wow! Thanks for responding so quickly :-) It seems that I'm having problems with both of my postings: Correct Way To Set Path To Config.php In Another Folder How Do I Get $Salt When It's In The Config.php File? Unfortunately, the first one is still a problem :-( Can you help me with that too? I was able to access the 2nd post now with the link you sent me, but I'm still getting the error message "Sorry, we couldn't find that!" when I click on the original link sent via email, which unfortunately means that the members who are being so generous with their time and trying to help me won't be able to access it either :-(- 5 replies
-
- path
- config.php
-
(and 1 more)
Tagged with:
-
How Do I Get $Salt When It's In The Config.php File?
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
@jazzman1: Here are the results from the 3 folders: Parent Directory /home4/clickfi4/public_html 'demo' folder /home4/clickfi4/public_html/demo 'secure_folder' subfolder /home4/clickfi4/public_html/demo/secure_folder- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
My previous post disappeared for some reason :-( Thankfully I still have the suggestions made by jazzman1 and AoTBuNgLe in my email :-) @jazzman1: Here are the results from the 3 folders: Parent Directory /home4/clickfi4/public_html 'demo' folder /home4/clickfi4/public_html/demo 'secure_folder' subfolder /home4/clickfi4/public_html/demo/secure_folder
- 5 replies
-
- path
- config.php
-
(and 1 more)
Tagged with:
-
How Do I Get $Salt When It's In The Config.php File?
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
I'm assuming that you're asking where the document is located? 'secure_folder' is located inside the folder 'demo', and I need to reference it from files which are either in the 'demo' or the parent directory.- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
How Do I Get $Salt When It's In The Config.php File?
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
What is the correct way to set the path to a file when it's in a subfolder? Adding the folder name like this didn't work require_once('secure_folder/config.php');- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
How Do I Get $Salt When It's In The Config.php File?
ChayaCooper replied to ChayaCooper's topic in PHP Coding Help
I'll try that again :-) I thought that should be the case, but when it didn't work I figured I must be doing something wrong ;-) Just to make sure that I'm not missing something I'm declaring in config.php $salt = "XYZ"; // 10 digit string. Then if I've created a connection to config.php in the other file I can just use it like this: '".sha1($salt + $_POST['password'])."'- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
I ended up creating an array in my php file with the images $Silhouettes = array( 'Crew_Neck' =>'files/style-Crew_Neck.png', 'Scoop_Neck' =>'files/style-Scoop_Neck.png', 'V-Neck' =>'files/style-V-Neck.png' ... ); And the array is referenced in these 2 places: foreach($Silhouettes as $cname=>$ccode) style="background-image: url('files/style-<?php echo $cname; ?>.png'); background-repeat: no-repeat; border: none;"
- 14 replies
-
- mysql_fetch_array query
- replace value
-
(and 1 more)
Tagged with:
-
I know this is a really basic question, but I'm still a real php noob. I want to move $salt to the config.php file, but I'm not sure how to call the variable correctly so the page can use it. I tried this: require_once('config.php); $salt = loadSaltFromConfig(); I'm assuming that I need to declare loadSaltFromConfig somewhere, but I'm not quite sure what that would need to be.
- 10 replies
-
- salt
- config.php
-
(and 3 more)
Tagged with:
-
darkfreaks -That option also prevents the page from loading :-(
- 14 replies
-
- mysql_fetch_array query
- replace value
-
(and 1 more)
Tagged with:
-
The page still doesn't load :-( Should I be defining $path somewhere? This is my current code (with the corrections suggested) <?php $result = mysql_query("SELECT * FROM style WHERE style.user_id=$user_id ") or die(mysql_error()); $row = mysql_fetch_array($result ); $images = explode(',', $row['silhouettes_like']); foreach ($images as $im) { echo "<img src='$path.$im'> and ; } ?> <?php echo "<img src='files/" . $row['silhouettes_like']. ".png'>"; ?>
- 14 replies
-
- mysql_fetch_array query
- replace value
-
(and 1 more)
Tagged with:
-
I'm not quite sure where that should go :-( Would you mind showing me?
- 14 replies
-
- mysql_fetch_array query
- replace value
-
(and 1 more)
Tagged with:
-
I must be missing something, because when I added it to my code it stopped working. Is this what you meant? <?php $result = mysql_query("SELECT * FROM style WHERE style.user_id=$user_id ") or die(mysql_error()); $row = mysql_fetch_array($result ); $images = explode(',', $row['silhouettes_like']); foreach ($images as $im) { echo "<img src='$path.$im'> } ?> Since these are images which I supply and there are a finite amount of images, I'm curious why it would be better to have a separate table for the images than to keep them in a folder on my server? Also, just to clarify - each row represents a customer, there are apx. 100 columns in each row, and many of the columns represent arrays where the user can select multiple answers (this particular element has 50+ choices), so I don't believe that they can be on separate rows.
- 14 replies
-
- mysql_fetch_array query
- replace value
-
(and 1 more)
Tagged with: