Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
PHP is a general-purpose, open source scripting language widely used in web development.
1
vote
Accepted
What's is wrong with this php code
echo("</tr>") not properly terminated.
2
votes
cs50::init(_DIR_."/../config.json") pset7
An object in PHP, meanwhile, is similar in spirit to, but more featureful then, a struct in C.
The CS50 class is defined around line 70 of CS50.php. … You'll find more info on php classes and objects in the php doc. …
2
votes
Accepted
register php pset7 query to INSERT do not work
Such a subtle thing. Your are inserting 3 columns (username, hash, cash). The computer thinks you are sending 4 values because of the comma in your cash amount. VALUES(?, ?, 10000,00)
1
vote
Accepted
PSET8 import fatal error
The problem is your insert query. You are inserting 12 columns, you have 12 ? placeholders, but you are sending 13 arguments.
Also, beware: implode returns a string. So you $str_values[0] et. al. wi …
2
votes
Accepted
syntax error, unexpected 'for' T_FOR
Not all of them! $alphacount = 0 :)
1
vote
illegal string offset error in portfolio
Each time you do this $positions[] = ["price" =>number_format($positions["price"],2,'.',',')];
there is a row added to the $positions array that does not have "name", "shares" or "symbol". Ditto these …
1
vote
Accepted
PSET8 import undefined offsets and fatal error
The problem is your input data. Your query is expecting 12 values on every line. The first line in your example has 9. You "lost" the blank columns from the text file, presumably when you converted ta …
2
votes
Accepted
When I run my apache50 server at ~/workspace/pset7/public why does login.php files open?
From the pset instructions:
Know that index.php is the
file that’s loaded by default when you visit a URL like https://ide50-username.cs50.io/.
...which calls (redirects to) login.php (via con …
1
vote
Accepted
week7 lecture2 source code speller.php not found
From your first link choose Index in the Source Code pane (far right). Choose misspellings/. Click on download to the right of speller. It will open with a text editor (like notepad++). It's also in …
1
vote
Accepted
How to make search.php return results that are more relevant
It's as simple as turning this
and obviously I would prefer "Cincinnati, OH" to be the first result.
into computer code :) Kinda moves into the realm of computer learning/intelligence.
First …
1
vote
Accepted
C$50 Finance Pset7 - Buy.php not INSERTing shares correctly
Learn something new every day! From the manual:
With ON DUPLICATE KEY UPDATE, the affected-rows value per row is 1 if the row is inserted as a new row, 2 if an existing row is updated, and 0 if a …
0
votes
Accepted
Final PHP/HTML Integration
How about:
LIST:
<a href="page.php?geo=SC">SC</a>
<a href="page.php?geo=NY">NY</a>
PAGE does logic based on $_GET["geo"]
0
votes
Excel into MySQL
php's fopen can take a url for the filename argument. So something like:
$fname="http://www.website.com/file.csv";
$handle = fopen($fname,'r');
while ($csvdata = fgetcsv($handle))
…
1
vote
How should I connect to the multiple databases?
Admittedly I don't fully grasp what you mean "merge several psets". However,in the narrow and specific context of CS50 pset7 & pset8, you do not need two databases. Consider adding the places table t …