16,004,647 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Rebecca2002 (Top 60 by date)
Rebecca2002
22-May-23 4:23am
View
true but how would I write it then? because I do need the users to know if its in the csv or not. if I just say:
// Read the contents of the file
while (($row_data = fgetcsv($file_handle, 1000, ';')) !== FALSE) {
if ($row_data[0] == $Zipcode && $row_data[1] == $Housenumber ) {
// User input found in the CSV
setcookie('cookie_test', 'true' , time() + 1000);
break;
}
}
setcookie('cookie_test', 'false' , time() + 1000);
it would always hit false
Rebecca2002
17-May-23 3:42am
View
the second page also needs to have session_start(); DOCS: https://www.php.net/manual/en/function.session-start.php
Rebecca2002
15-May-23 4:11am
View
to like the whole page? you could do *{ background-color: #f5f0fe;} or body{background-color: #f5f0fe;}
Rebecca2002
11-May-23 3:51am
View
the second question: Yes I don't know much about recaptcha so I didn't know if it was safe to just show the site keys. and I see what you mean with the enterprise I will remove it thank you
Rebecca2002
4-May-23 4:09am
View
I kinda need it the other way around. javascript is supposed to retrieve the cookie. because I'm doing a csv check in php and that response I want to show in javascript. for this I need set_cookie instead right? because the csv check isn't in a form.
Rebecca2002
3-May-23 3:41am
View
it has been a while. do you still need help?
Rebecca2002
1-May-23 6:06am
View
Deleted
use emmet to get the html quickly and compleet this means do: ! + enter
Rebecca2002
28-Apr-23 7:07am
View
but I need both of the $zipcode and $housenumber to be in the same row? because there are about 10 of the same zipcodes in the file that match up with the corresponding house number
Rebecca2002
28-Apr-23 6:28am
View
didn't know they had that in vscode aswell so tried it out but the terminal says there are no problems detected in the work space??
Rebecca2002
28-Apr-23 5:33am
View
Deleted
do you want something like this ?
Action
Another action
Something else here
Separated link
Rebecca2002
24-Apr-23 5:30am
View
I can't help you with javascript or otp codes for that matter but your mail is build wrong your not sending anything to anyone
Rebecca2002
19-Apr-23 7:31am
View
so what is it doing right now then ??
Rebecca2002
19-Apr-23 6:22am
View
ah thanks its still not working tough because $item is the first row of the csv for some reason?? <-- not sure why as it should contain the whole csv. and it compares it to just the zipcode or house number
so it always gives wrong trying to find something out about that. Like with in_array I guess.
Rebecca2002
19-Apr-23 6:10am
View
yes but isnt thats what i want? because I have multiple of the same zipcodes in my file. so both of the housenumber and the zipcode need to be in the same row in the csv for it to be true.
example csv
6483 XP Zipcode
34 housenumer
6483 EJ zipcode
45 Housenumber
user types in
6483 XP zipcode
45 housenumber
then this has to give false because that adres doesn't exist
Rebecca2002
19-Apr-23 5:28am
View
I dont know why but it's not showing the error now. only problem is that its still not properly checking if user input is in the csv file
Rebecca2002
19-Apr-23 5:16am
View
yes but when I type that it gives me 8?? idk why it would give me 8? and if I do echo $item; it shows the first whole row of the csv
Rebecca2002
12-Apr-23 7:49am
View
maybe this can help you out https://www.w3schools.com/w3css/w3css_progressbar.asp
Rebecca2002
12-Apr-23 7:44am
View
oh and #top ul.menu > li a is calling this
or your looking for #top ul.menu > .active this one calls a very dark grey
Rebecca2002
12-Apr-23 7:42am
View
im not sure what you mean? but the #eee is a light greyish color and #fff is white. if you have trouble finding the colors you need try https://www.w3schools.com/colors/colors_picker.asp
Rebecca2002
4-Apr-23 7:55am
View
thanks
Rebecca2002
4-Apr-23 7:51am
View
if you don't know anything about this code why don't you look up a tutorial instead of copying the whole code? no hate but obviously you don't understand anything of it maybe check youtube a bit https://www.youtube.com/results?search_query=php+multiform+tutorial. the reason why people can't help you is because you can't say the exact problem
Rebecca2002
24-Mar-23 4:46am
View
So I did that and right now it says yes I added it to the csv. and when I enter it into the system he says yes this postcode aka zipcode is in our system you can join but when I open the csv file in excel I don't see hte row being in there is this normal? als when I retry the application the zipcode I added says it isnt in ther eanymore
Rebecca2002
23-Mar-23 6:41am
View
Ok I hvae gotten somewhere but it still isn't adding a new row. i know it isn't because I look at the csv file and there are no uptdates. this is the code that should add the row: if (!found)
{
string modified = Postcode.Insert(4, " ");
string newRow = modified + ";" + Housenumber + ";";
lines.Add(newRow);
File.WriteAllLines(fileName, lines);
// dit doet hij nog niet denk ik
MessageBox.Show("Adres word toegevoegd aan de csv: " + Postcode + " " + Housenumber);
}
Rebecca2002
23-Mar-23 4:44am
View
thanks i did some debuging and figured out that my fields only have on items from the list and not the whole list
Rebecca2002
25-Jan-23 5:25am
View
so what I want is if user clicks a button the variable hoge_korting aka high discount in the table. changes from a 0 to a 1 and reverse. this works perfectly but the problem is I don't have a nice way of showing admin that hoge_korting has changed from a 0 to 1. I had this idea of: if user clicks high discount yes then go to my update script bevestigen and enter it into the db + send the row an email. then go back to the table and delete the buttons or show a way so that the user knows if row 1 has a high discount of 1 or 0
Rebecca2002
16-Mar-22 2:47am
View
I have both index.php and login.php in the same folder so both of them should have the same link to the favicon file right?
Rebecca2002
14-Mar-22 8:13am
View
sorry but what do you guys mean? the loops work? and the codes work I just wanna know how I will put this styling on the section tag that is inside the while loop?
Rebecca2002
8-Mar-22 3:30am
View
and I fixed the sql injection sorry bout that
Rebecca2002
8-Mar-22 3:28am
View
yes sorry I meant reset it I couldn't think of the right word in English sorry. but yes I indeed mean reseting the password.
Rebecca2002
25-Jan-22 9:03am
View
so I have been trying to use the session for a while now and I can't get it to work i'm right now gonna try the db way
Rebecca2002
25-Jan-22 8:47am
View
no I don't I actually wanna use sessions unless its more difficult to use them
Rebecca2002
25-Jan-22 8:06am
View
been trying to figure this out for 3 hours now but still don't get it. do you maybe have a link for storing the quantity against each cart item? I'm so sorry I feel so stupid right now but I just don't get it.
Rebecca2002
25-Jan-22 4:08am
View
yeah I was thinking of using a session and did $_SESSION['quantity'] = $_POST['quantity']; but again that shows just the last one that the user enters.
Rebecca2002
25-Jan-22 2:56am
View
well I can't see your code but maybe start using grid? https://css-tricks.com/snippets/css/complete-guide-grid/
Rebecca2002
25-Jan-22 2:54am
View
https://www.w3schools.com/php/php_if_else.asp
Rebecca2002
25-Jan-22 2:53am
View
you forgot the if and just started with else if here is a link to if/else or if/else if/ else statements
Rebecca2002
19-Jan-22 5:35am
View
Deleted
like how this is done:
and then PHP code:
Rebecca2002
19-Jan-22 5:31am
View
you said "NB: You don't appear to be storing the quantity anywhere on the cart. If the user updates the quantity of "pants" to 2, and then updates the quantity of "shoes" to 2, the quantity of "pants" will be reset to 1." but am I not storing that in $_POST['quantity']?
Rebecca2002
18-Jan-22 3:23am
View
this is a lot of code but how will I add the order and the order items into my db? and how will I use the items from my db?? I know that I have to change something in the function getAllKnownItems() but I don't know what
Rebecca2002
14-Jan-22 5:52am
View
I understand the styling and that it might be messy but I have tried to do this already for a very long time and I had to show at least some results so I decided to style the page. this is also easier for me to see when the code does something. but to the real problem:
I have tried to put the $_SESSION['basket'][] =$row['broodjes_ID']; outside the while loop but then I guess it just kinda skips it? like it doesn't add anything anymore into my array. I also want to say that your comment 2 a is not true. I did wrap it into php tags. its more like <php echo="" "<form="" action="cart.php?broodjes_ID='. $row['broodjes_ID'].'" method="POST" name="broodjes" value="<?php echo htmlentities(serialize($_SESSION[" basket"]));="" ?="">
Bestellen
"; ?>
Rebecca2002
11-Jan-22 4:16am
View
updated the post I'm so sorry I guess the probelm is that when I select something inside the dropdown it doesn't go to the action page and because of this it doesn't show the price
Rebecca2002
11-Jan-22 3:52am
View
wait I will show you what I have right now I will update the post with the extra file because I don't think I can explain it very well. I do understand the part of the backend my problem still is with calculating it in the seperate file. because $row['prijs'] how will I tell the file to use that right there it doesn't seem to understand it right now? maybe make new connection??
Rebecca2002
11-Jan-22 1:16am
View
@Richard-MacCutchan right now tried to do it on the same page but no results
Rebecca2002
11-Jan-22 1:14am
View
but my price depends on my $row['price'] value how will I bring this there????
Rebecca2002
10-Jan-22 16:20pm
View
it goes to a page called action_page.php??
Rebecca2002
10-Jan-22 15:28pm
View
I'm sorry ( maybe I don't understand your anwser) but I did and it just tells me how to make it. I know how to make a select tag with option values in there. I already made one in the code but now I want to do something when the user presses an option( for example when user presses 2 do the calculation that you made) that's what I'm not understanding how to do
Rebecca2002
10-Jan-22 15:27pm
View
Deleted
I'm sorry ( maybe I don't understand your anwser) but I did and it just tells me how to make it. I know how to make a select tag with option values in there. I already made one in the code but now I want to do something when the user presses an option( for example when user presses 2 do the calculation that you made) that's what I'm not understanding how to do
Rebecca2002
10-Jan-22 13:14pm
View
yes thats also what I wanted to use but how do I make $qty change depending on what option the user chooses? for example user chooses from the dropdown menu option 2 then I want $qty also to be 2 how do I do that
Rebecca2002
22-Dec-21 3:10am
View
but then how will I have my array??
Rebecca2002
21-Dec-21 4:05am
View
nevermind I see what I did wrong
Rebecca2002
21-Dec-21 3:50am
View
can someone help me?
Rebecca2002
13-Dec-21 7:46am
View
I need to be able to click on the add to cart button and when I do that I want the title of the cart-item in the console.log
Rebecca2002
10-Dec-21 6:49am
View
Deleted
thank you for helping me clean up the code but unfortunately, it still doesn't work:
I changed it into this:
and it still doesn't give the order id to the url so the mailing function doesn't understand what order_id means
Rebecca2002
8-Dec-21 10:05am
View
ok I edited it with prepared statments and I guess the problem is that it can't even get order_id in the table
Rebecca2002
8-Dec-21 9:57am
View
Deleted
ah sorry I missed that I put method post in there. as for the sql injection thank you for warning me but I'm aware that it isn't safe yet. but this is just so I understand how it works. after this I will add parameterized queries. however it still can't seem to find the id in the delete script.
Rebecca2002
8-Dec-21 4:48am
View
yes that was indeed the case. had to look on the internet how to do that but it works now.
Rebecca2002
7-Dec-21 6:23am
View
thank you so much! weird that it didn't told me the error was in there
Rebecca2002
2-Dec-21 7:21am
View
alright I got it now thanks you for the documentation I guess I wasn't reading it right
Rebecca2002
2-Dec-21 7:10am
View
ah oke I had tried that before but what happens is that I can't get $row['password']; from the db
Rebecca2002
1-Dec-21 6:04am
View
please post your full code. the mistake is somewhere else
Show More