-
Posts
1,025 -
Joined
-
Last visited
Never
Posts posted by Caesar
-
-
I would agree, Dreamweaver sucks royal monkey nuts. You will develop bad copding habits and it does little to show you what real/clean PHP should look like.
I use UltraEdit (A text editor with syntax highlighting...does not generate code like l4m0rz DW) but there's a number of decent ones out there.
-
If your URL looks like
http://mysite.com/index.php?pid=10
Then...
<?php $pageid = $_GET['pid']; echo'You are viewing content for Page ID: '.$pageid.''; //Will output..."You are viewing content for Page ID: 10" ?>
-
First, any reason why you're not closing your anchor tags? Haven't read the other posts...so not sure if there's a practical point to that. Second, You're defining the session variable for username, as "username"...that's why it's outputting that.
-
Using a switch...or maybe using regex.
-
Short answer, yes, that should be simple.
You may want to look into two things:
1. Using PHP with MySQL
2. Using $_GET
-
UltraEdit
Look into it. It's completely kick ass. It's a simple text editor that highlights code and allows for hiding of functions so you can work on classes easier. It also FTP's.
-
Where in your code are you assigning values to those variables? ($Title, $Forename, $Surname)
-
Take some basic html tutorials (http://w3schools.com). Do not rely on Dreamweaver....you'll pick up very bad habits. Plus it sucks.
-
You're obviously doing something wrong (Blank screen = php error, and you likely have display_errors turned off in your php.ini file) but without code no one is going to be able to give you an answer.
-
What errors are being returned?...And are you suppressing errors?
-
<?php $strvar = "Line one\n"; echo $strvar; /*Will echo... Line one */ ?>
<?php $strvar = "Line one\n"; $strvar .= "Line two\n"; $strvar .= "Line three\n"; echo $strvar; /*Will echo... Line one Line two Line three */ ?>
-
By the way...I meant 65K USD. if you're in the UK, I'm sure there's many opportunities in the bigger cities.
-
what was the point in going to uni and not nowing what you went for?
was it for the sake of a piece of paper?
Most conmputer programmers are self tault in computer programming and dont need uni in any way or form, most good computer programmers dont need proper office jobs they use the net as there income.
you state you no php quite well so earn money then it that easy ok.
i dont no how to spell properly or can see well but i own my own home and get a nice income due to php mysql css and html you as a uni bud should be caking it in what going on?
Working in an office can pay off.
My friend has been out of the university for less than a year. He is working for a company that develops software for government schools. He will have made roughly 65K this past year. I say, it's not a bad choice...and it looks good on the resume.
Edit: His strength was PHP initially but he is now working with .NET and C++/C# stuff. I'm not doing so bad working in an office (I do side projects as well 8-))
-
Don't rely solely on PHP. Try to pick something else up like C++. PHP is great but most decent paying employers look for people with knowledge in compiled languages.
-
FTP the files to your server. Server must support PHP. If the PHP app/script requires a database, you will have to set that up as well.
-
What exactly do you want to fetch from that page? Let's start there and I will help you get to the finish line :-P
-
what happends if the server die's for couple of hours..?
what happens then?
If that happens, you're screwed regardless....until the system comes back up.
-
Insert the dates as a timestamp into an INT column/field.
<?php $mydate = 'January 15, 2005'; //Assuming that is the date submitted in $_POST['fdate'] or whatever $formatit = strtotime($mydate); ?>
When you query for dates later..you can format easily for display....in any format you want using the date() function.
-
<?php function check_value($myvalue) { if((!isset($_POST['.$myvalue.'])) | ($myvalue == '')) { $myvalue = ''; } else { $myvalue = $clean->clean_input($_POST['.$myvalue.']); } return $myvalue; } ?>
-
It looks to me like you're not formatting your links correctly. What's with the forward slash after the .php page? Also....
print '<td NOWRAP>'."<a href=\"Allfields-50.php/$href_top_x\">$href_top_x[/url]".'</td>';
<?php echo'<td NOWRAP><a href="Allfields-50.php'./.'$href_top_x.'">'.$href_top_x.'[/url]</td>; ?>
But I'm still not clear on what you're doing. Would have to see the rest of your code...or how the link is actually echo'ing out.
-
If you look on the back end...in the database, how is your data being stored?
-
cron job
But I'm not sure that's what you want.
Also...they don't need to run every minute...they just need to be accurate to-the-minute....when someone tries to access them. Huge difference.
-
In any page you want to use that session variable....
<?php session_start(); $very = $_SESSION ['very']; echo $very; //Should still output a value even on diferent pages; ?>
Though you can also look into constants....doing this once....it has been defined and it's value won't change....so it depends on your script and logic in terms of what approach would be best.
<?php define('VERY_DEFINED', $your_value); ?>
Edit: But you must initiate the session (session_start()) before using the session variable in other pages.
-
Once you define a session variable...it can be used in any page as long as you initiate the session in each page....you can then do whatever you want. keep track of what questions they've already answered....etc...etc.
<?php sessions_start(); if(isset($_SESSION['current']) && isset($_GET['q'])) { $question = $survey->clean($_GET['q']); $query = $db->query("SELECT * FROM sessions WHERE sess_id = '$question'"); $current = $db->fetch_array($query); $answer = $survey->check_question($current[$question]); //Check to see if this question has been answered } ?>
Keep in mind I just threw that together without much thought so...it is for illustration purposes to give you a basic idea.
XML PARSING Error (IN PHP4)
in PHP Coding Help
Posted
What's the exact error you're seeing?