Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
You need something that they would think it would be worth checking out. I mean, I'm no marketing master but you could list some major advantages having a website: -Easier Customer Relations and content management -Better advertising marketing -Cheaper than the competition...(maybe ) etc...
-
Inspiration in many forms, which implies it's just inspiration, not CnP the CSS and images and implement it into your site. Just look around for different styles that go together and tweak them to your liking.
-
Must be the way you're using POST. We would need to see the processing part. I used this code and it outputs "2009" to the browser when I don't select anything... if(isset($_POST['submit'])) { echo $_POST['year']; } ?> </pre> <form action="<?php%20echo%20%24_SERVER%5B'PHP_SELF'%5D;%20?>" method="POST"> ; ; 2009; 2010; < Oh, and why do you have date(Y) and 2009?
-
*** Not tested Try: $sql="DELETE FROM jos_content WHERE created $result = mysql_query($sql) or die(mysql_error()); $num_deleted = mysql_num_rows($result); echo "deleted rows" . $num_deleted;
-
[SOLVED] getting the name of the page the user is on
Maq replied to shadiadiph's topic in PHP Coding Help
If you want accurate results I wouldn't use $_SERVER['HTTP_REFERER'] it cannot be trusted: From the manual: -
You output to the browser before you call the header function. For more detail read here: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
I don't see where you assign these sessions values? session_register('house'); session_register('fline'); session_register('sline'); session_register('city'); session_register('county'); session_register('postcode'); * You don't need the session_register you just need something like you did with the other group of sessions: $_SESSION['fname'] = $_POST['fname']; $_SESSION['lname'] = $_POST['lname']; $_SESSION['login'] = $_POST['login']; $_SESSION['password'] = md5($_POST['password']); $_SESSION['email'] = $_POST['email'];
-
NEVER use short tags....
-
Query Database to return a single row/column with comma delimited string?
Maq replied to esender's topic in MySQL Help
SELECT GROUP_CONCAT(title) FROM node WHERE type=1 LIMIT 20 -
You need to put a comma here in your first query: password,
-
Yeah I was just wondering how it's spread out because it's such an odd number. What are you studying?
-
So how are the hours divvied up in the work week?
-
Here's some phone # regexes that may help you: http://regexlib.com/DisplayPatterns.aspx?categoryId=7&cattabindex=2
-
What OS you use? I think he was going to suggest WAMP or LAMP depending on your OS. Which I would suggest because it makes installing your local server 10x easier.
-
I think we all agree with that. Well doesn't matter for me, I get paid salary and am assigned projects with deadlines. So if I can't get it done at work then it comes home But it's usually done, hence why I'm on phpfreaks all day, what would I do without this place?
-
Okay.... I'm not going through all that code especially when you didn't use tags. Wherever you POST the input fields check to see if they're empty and w/e other validity checks you desire. If any of them are invalid, then redirect to the contact form. If not, then insert. You can also check with Javascript before you submit to the next page but I would suggest doing the PHP server-side check first. To prevent mysql injections invoke the mysql_real_escape_string() on anything you insert in the DB...
-
No problem. Oh, and the answer as to how I find the time for leaving such crits, I'm currently unemployed Sorry to hear that :-\ What about some freelance projects? We definitely appreciate your critiques, I often read them to improve my design skills, which aren't too sharp.
-
Welcome! Sorry to hear that you got layed off :-\ http://www.phpfreaks.com/tutorials There's also some blog posts that you may find interesting.
-
So am I. I think this was made by an open source fanatic...
-
Can we see your code? That also depends on your code, are you using MySQL? Use CSS.
-
Do you have different versions of PHP? session_is_registered has been deprecated in recent versions of PHP. You have to use isset if (!isset($_SESSION['username'])) { header("location: ../index.php"); } else { echo $_SESSION['username']; }
-
Funny... That was an interesting poll, although I wish they went into more depth.
-
No problem. He already had a while loop to display each diary_duration but he wanted the sum of all of them, and MySQL has a simple built in SUM function.
-
You didn't change this line...: $result = mysql_query(sprintf("SELECT SUM(diary_duration) FROM diary WHERE diary_date = '$_GET[date]'"));
-
If I understand you correctly use: $result = mysql_query(sprintf("SELECT SUM(diary_duration) FROM diary WHERE diary_date = '$_GET[date]'")); $row = mysql_fetch_array($result) echo $row['SUM(diary_duration)'];