Skip to main content

Questions tagged [sell]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
317 views

pset7 sell.php doesn't sell stocks or change cash

I'm done with pset7 but my sell.php never updates the portfolio table when I sell stocks. it only displays the drop-down menu correctly where it shows the stocks bought in the list, but when i choose ...
Riham Nour's user avatar
0 votes
1 answer
115 views

a problem with queries in sell.php

My problem is that whatever symbol I write in sell_form.php even if it doesn't exist in portfolio table, the query retursn true. Here's the query in sell.php and that's sell_form.php <form ...
kawegan's user avatar
  • 76
0 votes
0 answers
102 views

pset7, Database updates, but not reflected on screen

Update I found out that $cash is only holding a value of 1, when the database has a value of 10,942.54. the number format i was using in portfolio.php was stretching the 1 to 10,000. Any idea why the ...
Kris Valentine's user avatar
0 votes
2 answers
102 views

pset7: displaying apology for messups

So I'll start easy with quote.php. It works if I give the correct symbol, and correctly apologizes if i leave the form blank. But any invalid symbols seems to allow for render to work on quote_display....
Fijj01's user avatar
  • 11
0 votes
2 answers
270 views

How to create a dropbox menu in pset7 sell_form.php?

I'm currently struggling with the sell form of pset7. I want to create a dropbox menu with displays the stocks a users owns and is able to sell. I have a controller called sell.php and a template ...
Wouterbieze's user avatar
1 vote
2 answers
100 views

Array in php vs R (pset7 sell.php)

Ok, I'm at pset7 (C$50 Finance), more specifically trying to implement sell.php. I have created a template, sell_form.php, where users can select the symbol of the stock they want to sell and ...
Cyborg101's user avatar
2 votes
1 answer
77 views

Pset7 How to Program Popup?

I'm trying to create a popup after a user successfully sells a stock. I want it to look like Chrome's confirm form resubmission popup I'm pretty sure I need javascript, html, and css, but I'm not ...
i_am_david's user avatar
  • 1,211
2 votes
1 answer
318 views

Cannot get drop down menu to display for pset7. Why would this be?

I have set up a template form that sends the symbol selected by the user to the controller. I cannot get the form to show when I request the page. Here is my code for the form: <form action="...
ascar's user avatar
  • 23
0 votes
1 answer
301 views

sell.php doesn't update cash and does sale of stock does not show up in history

I've been having a lot of trouble with sell.php. I can sell stocks, that is, they are removed from the stock list but I do not receive the cash from the sale. Also, sale history does not show up on my ...
Kim's user avatar
  • 137
0 votes
1 answer
241 views

sell.php, not able to sell

For some reason, the portfolio does not change after i sell the stock, can anyone please help.here's the code, i need some hints of whats going wrong.thanks in advance. sell.php : http://tny.cz/...
Yat Long Lo's user avatar
0 votes
0 answers
346 views

Cash and stock do not update in sell.php

I'm having a bit of trouble in sell for pset 7. My form displays and when I click submit I am redirected to the portfolio. However, the portfolio is not changed: all my stock and cash are still the ...
Kim's user avatar
  • 137
1 vote
0 answers
307 views

Update Cash in "sell.php" is Not Working

Everything is working file but the cash is not updating. I think its due to typecasting. The value for shares is an integer and price is a float-point integer but I'm confused as to how to cast them. ...
avishek arora's user avatar
0 votes
1 answer
218 views

Where is the issue with my sell template?

I am having issues with the creation of a template which is supposed to show a dropdown where a user can select from a list of symbols of the stocks which he/she wants to sell. I am employing the ...
segmentationfaulter's user avatar
0 votes
0 answers
141 views

PHP data comparison for sell.php

when ever I try to use if($shares > $_POST["shares1"]) (where shares is equal to the shares you currently own and shares1 is how many additional shares you want to buy, with redirect() inside of it)...
user1475's user avatar
1 vote
1 answer
88 views

Convert sold shares to an INT - PSET7

When I query my Database for the number of shares of some user, I get a strange value when converting this value to an int or a float. For instance, my query should return the value of "100" shares ...
Juan Carlos Piñeros's user avatar
0 votes
1 answer
242 views

How to Access Values That Are Submitted from sell_form.php to sell.php?

I was wondering how do I retrieve the value (shares * price) of the stock sold in sell.php in order to update cash in users. In the template sell_form.php, I have the following code <select name="...
hunter's user avatar
  • 31
0 votes
1 answer
89 views

Unexpected if in sell.php

I checked all of my code in sell.php and when I try to run it I get the syntax error of unexpected 'if' in /home/...../sell.php. Can anybody try to find my mistake. Part of my code is below. if ($...
Richard Qiu's user avatar
0 votes
1 answer
746 views

How to create a drop-down menu that contains the stocks that has as options?

I'm struggling trying to create the form for this part of the pset. I have a controller (sell.php) and a template form (sell_form.php). Sell.php receives submission from sell_form.php, delete user 's ...
FranGoitia's user avatar

1
2