Show all posts by user
Internet Programming
Page 1 of 1 Pages: 1
Results 1 — 23 of 23
Line 23 is the quoted "header();" line.
If you call the header() function, are you allowed a "normal" html header (as in my quoted code) to still be at the top of the page? Header() that seem to call pages where there is no html coded header seems to be ok. I've worked this problem away with an html meta tag. I just left the original header() call there in comments
by
47376120 - Bergie
-
ICT2613 Sem 2
Ok, I did not realise comments will be seen as part of the page. Moved it and the warnings disappeared.
Now I have used the "headers()" function to redirect and get this.
Warning: Cannot modify header information - headers already sent by (output started at /home/######/login.php:23) in /home/######/login.php on line 40
And here is the offender.
Language: PHPheader("
by
47376120 - Bergie
-
ICT2613 Sem 2
On my local linux server (Running on a Raspberry Pi) I was able to get my code working as I expect it to.
Now after moving my database and web pages I get an abundance off errors, although the code seem to work fine.
I get hese for every page I open that have a session_start() at the top.
Warning: session_start() : Cannot send session cookie - headers already sent by (output started a
by
47376120 - Bergie
-
ICT2613 Sem 2
Unisa website is down. I want to submit my portfolio, but only saved a local copy of the tut letter.
Can anyone post the procedure here please. If it's not Saturday when you read this, don't worry.
EDIT: Don't worry - Copy found in my Downloads folder.
by
47376120 - Bergie
-
ICT2613 Sem 2
I decided to add another link on the index page.
My assignment done, was about to submit, but now I cannot read the submission document.... Only saved the tut letter with requirements.
Oh well.
by
47376120 - Bergie
-
ICT2613 Sem 2
I have a simple style sheet, "style.css" and some functions on a seperate sheet, "functions.php" and of course the required "connect.php."
Where and how do we link to the text of those sheets? The portfolio requirement says every page should have a link to its code, but the above pages does not ever display in the browser.
Regards
by
47376120 - Bergie
-
ICT2613 Sem 2
I think it is. (although the text formatting above did not do it justice.) I would much rather look at one page with all the requirements, than multiple clicks for the same data. I believe HTML also say that you should limit the clicks to get to info, so that is what I did. I even concatenated, date, venue and opponents into one column for the very same reason.
Almost done, even after I accide
by
47376120 - Bergie
-
ICT2613 Sem 2
On requirement 2c, are we allowed to show the fixture and teams selected for all fixtures in one table?
I have a list of all fixtures, with each and every player next to it in one row.
It saves me more coding..
Something like below:
Fixture Coxswain Rower Drummer
Mars at Jup
by
47376120 - Bergie
-
ICT2613 Sem 2
Below my code. For simplicity I did not include any other code.
Language: PHPelseif($insert="yes")
{
$query = "SELECT *FROM fixtures WHERE fixtures.fixture_id NOT IN (SELECT teams.fixture_id FROM teams WHERE fixtures.fixture_id = teams.fixture_id)"; //get only fixtures with no teams added
$result = mysql_query($query)
or die(&qu
by
47376120 - Bergie
-
ICT2613 Sem 2
I was busy doing exactly as you suggested in the last line. Present then add and update.
Now is there a way to only present fixtures that has not already been assigned a team with mySQL or will I need the logic in php?
I was thinking somehow to send a query that only return fixtures that does not already have a mention in "teams" fixture id with something like this.
$check = &q
by
47376120 - Bergie
-
ICT2613 Sem 2
I've tried and failed many times.
How do I relate the two tables, "fixtures" and "teams?"
I understand that there is some way of adding the "fixture_id" of table "fixtures" to the "fixture_id" of table "teams" in the database in such a way that the database engine automatically updates "teams"
with the new fixture_
by
47376120 - Bergie
-
ICT2613 Sem 2
After the HTML course, I was under the impression that tags should look like this:
Language: HTML<a href="a_link.com">blah</a>
If I drop the quotes, its not strict HTML. What you say is that when php echo the HTML code, I should disregard HTML coding?
by
47376120 - Bergie
-
ICT2613 Sem 2
Here is a line of code that gave me endless troubles.
This worked:
Language: PHPecho "Are you sure you want to delete this fixture? <a href=';fixtures.php?fixture_id=$this_fixture & delete=absolutely';>YES</a>
 <a href=';fixtures.php';>NO</a>";
This did not:
Language: PHPecho "Are you sure you want to delete this fixture? <a
by
47376120 - Bergie
-
ICT2613 Sem 2
TA.
I did not realise it will be send as a GET method.
Now my variable prints as expected in my test code.
by
47376120 - Bergie
-
ICT2613 Sem 2
I have come across this line of code in the portfolio guideline:
Language: PHP<a href=edit.php?player_id=$player_id>BLAH</a>
"edit.php" obviously is the php code page that should be used upon clicking. "$player_id is what was extracted from the database, but I am not 100% sure what is meant by the "?player_id="
I can't find specific reference to the
by
47376120 - Bergie
-
ICT2613 Sem 2
Do we have to ensure that all input is protected from php injections and that the data is of the correct type?
How deep do we have to go ensuring integrity of user input?
by
47376120 - Bergie
-
ICT2613 Sem 2
The line to open the text file should read like this.
Language: Javascripttextcode = window.open("code.txt","Code", "width=300, height=500");
Inline it did open the text file. I removed all else from the function, except for window.open() and it display the text then. Was I going for overkill trying to give headers etc?
Mind you, do we have to have perf
by
47376120 - Bergie
-
ICT2613 Sem 2
In case anyone think I am lazy for asking. I am willing to post my browser history as well....
I used on onclick event with my link to open a new window. Basically a window.open() in javascript. That part is no problem. But I cannot get the text file to display inside the window. I save the text file as "code.txt" in the same folder. No solution I tried worked. Most searches came up
by
47376120 - Bergie
-
ICT2613 Sem 2
I was only trying to put the file into a variable for transferring later.
Using Language: PHP$mycode = file_get_contents("code.txt"); does what is expected. I.e. put the contents of the file in a variable.
When it comes to the actual javascript, I open the window, but for the life of me I am unable to print the file contents into that window. I spend more hours on this bit o
by
47376120 - Bergie
-
ICT2613 Sem 2
I use this to read my text file into a variable.
Language: PHP$mycode = readfile("code.txt");
Problem is it display the text file on my web page without any call to display it. It messes up my page. I expect it should only display with this line:
Language: PHPecho $mycode;
Is this normal behaviour?
by
47376120 - Bergie
-
ICT2613 Sem 2
Here is two blocks of code that does the same when opening in browser.
Language: PHP<?php
/* --------------TESTING VARIABLES------------
Use this type of comment if you want to spill over to more than one line.
Notice how the comment begin and end.
*/
$test_String = "It Worked! ok sort of yeah ";
$number = 45;
print($test_String);
print("<
by
47376120 - Bergie
-
ICT2613 Sem 2
How do we set the forum posts to show newest at top - or in any other order for that matter? Its a bit frustrating looking for a post if I can't sort.
by
47376120 - Bergie
-
ICT2613 Sem 2
I already have a domain name registered and all and paying the monthly fees. Will I be able to use it? The current address is xxxxxxx
I can change the folder names if I have to.
I would prefer using this domain, since its already set up and save me a lot of software installations. It also have online editing functionality for code, so I can use virtually any devices.
Regards
by
47376120 - Bergie
-
ICT2613 Sem 2