
R4nk3d
Members-
Posts
157 -
Joined
-
Last visited
Never
Everything posted by R4nk3d
-
What exactly to you mean? What happens, are there errors? It says it wasnt created and i look in the database and its not. there arent any errors. It just wont insert it. Dont worry, i have the mysql connection info in the file and thats not the problem. Ok, heres the error it gave me: ErrorDuplicate entry '0' for key 1. Im trying to find a way to count all of the rows in the database, and then set the new page to that id.
-
dont forget to use the topic solved button
-
What exactly to you mean? What happens, are there errors? It says it wasnt created and i look in the database and its not. there arent any errors. It just wont insert it. Dont worry, i have the mysql connection info in the file and thats not the problem.
-
if($_POST['type'] == "page") { $name = $_POST['name']; $body = $_POST['pagebody']; $sql = "INSERT INTO links (name,body) VALUES ($name,$body)"; $result = mysql_query($sql,$connection); if(!$result) { echo "<h1>Creation Unsuccessful</h1>"; echo "The page could not be created. Please try again later."; } else { echo "<h1>Creation Successful</h1>"; echo "The page <a href=\"$r[location]\" />$r[name]</a> has been successfully created."; } } I am developing a small cms system and i am working on the create.php page to create new news articles and pages. I am having a small bit of trouble tho. The sql query wont work correctly. Can anyone help me? Heres the html form of the previous page: if($_GET['type'] == "page") { echo "<h1>Create: Page:</h1>"; echo "Please enter all the facts about the page and then the body of the page."; echo "<br>"; echo "<form action=\"create.php\" method=\"post\" name=\"newpage\"><table width=\"0\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; echo "<input name=\"submitting\" type=\"hidden\" value=\"1\" /><input name=\"type\" type=\"hidden\" value=\"page\" />"; echo "<tr>"; echo "<td>Name Of Page:</td>"; echo "<td><input type=\"text\" name=\"name\" id=\"name\" /></td>"; echo "</tr>"; echo "<tr>"; echo "<td>Page Body:</td>"; echo "<td><textarea name=\"pagebody\" id=\"pagebody\" cols=\"45\" rows=\"5\"></textarea></td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan=\"2\"><input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Submit\" /></td>"; echo "</tr>"; echo "</table></form>"; }
-
ive gotten errors from it before and it just didnt work sometimes so i didnt know. just trying to help.
-
Yeah, i get paid for them...
-
haha, yeah, were u abused by the people at the houses?
-
Im tryin a way where i put all the php code into inc.php files in a sources folder (kinda like smf) and then on the template i have the body/header/etc. just say require/include("sources/file.inc.php"); workin pretty well so far.
-
this is the one that will work, and just in case it doesnt, make it: echo "Date: <input type='text' name='date' value=\"$row[date]\" /><br /><br />"; without the 's around date.
-
shes cute i got a neice thats about 17 months old now i think. real pain to sleep with, but fun during the day.
-
"); } hmm. never thought of that. XD sorry.
-
Ur a life saver Thank you a ton.
-
Just use= if(isset($_GET['page'])) { include("pages/$_GET "); }
-
It could be this but i dont think so, ur missing a " ' " before $team in the $sql. $sql = "SELECT * FROM results WHERE 'resultteam'='$team' order by ID DESC LIMIT $Start,$pageLimit";
-
if($_GET['type'] == "page" && isset($id)) { $sql = "SELECT * FROM links WHERE 'id'='$id'"; $result = mysql_query($sql,$connection); $rows = mysql_num_rows($result); if($rows == 1) { while($r = mysql_fetch_array($result)) { echo "<h1>Edit: News: ID $r[id]</h1>"; echo "Please use the editor below to format the page. To insert a special type of text, please click the button."; echo "<br>"; echo "<form id=\"pagecode\" name=\"pagecode\" method=\"post\" action=\"edit.php?type=page&id=$id&submitting=1\">"; echo "<input name=\"header\" type=\"button\" onclick=\"insertCode('<h1></h1>','pagebody');\" value=\"Header\" />"; echo "<input name=\"nl\" type=\"button\" onclick=\"insertCode('<br>','pagebody');\" value=\"New Line\" >"; echo "<br />"; echo "<textarea name=\"pagebody\" id=\"pagebody\" cols=\"80\" rows=\"10\">".$r['news']."</textarea>"; echo "<br />"; echo "<input name=\"submit\" id=\"submit\" onclick=\"checkconfirm('pagecode'); return false;\" type=\"button\" value=\"Submit\" />"; echo "</form>"; } } else { echo "<h1>Edit: Page: ID Not Found</h1>"; echo "The page id you have searched for cannot be found. Please try again."; } } I am using this code to make a small cms. But the problem is, even tho the id exists in the database and you can view it on the page that shows its body, it says on this page it does not exist and i cannot figure out why its not working. can anyone help?
-
cutie haha how old? 18 months or so?
-
$sql = "SELECT * FROM results WHERE 'resultteam'=$team' order by ID DESC LIMIT $Start,$pageLimit"; $result = mysql_query($sql,$connection); try that,
-
mine lowercase and _'s for variables and camelCase for functions. i like to use the camelCase cause i could have a command like: insertCode() for like a forum txt box or insertImg() so it would tell me what im inserting and it would be a clean command, instead of insert_image or something. just cleaner and easier for me
-
I agree with that. I taught myself. http://www.w3schools.com is a great place to start out. thats where i did.
-
who owns domains? what stopping me from selling them?
R4nk3d replied to Orionsbelter's topic in Miscellaneous
You are right, $2500 isn't a lot. But the thing that makes it so hard to get accredited is the things you need to have at your business. You need servers to host the domains, you need php/asp scripts and a website to allow people to search and purchase the domains, you need to have another script to let them change the name servers, etc. It's just hard to get it all brought together. P.S. For anyone who'd like to see how long the form is, heres the link: http://www.icann.org/en/registrars/accreditation-application.htm -
who owns domains? what stopping me from selling them?
R4nk3d replied to Orionsbelter's topic in Miscellaneous
I never said the U.S. government, i said ICANN, which is the corporation that runs/creates domains.... p.s. look at the quote: -
who owns domains? what stopping me from selling them?
R4nk3d replied to Orionsbelter's topic in Miscellaneous
haha, gotta love ICANN. XD -
who owns domains? what stopping me from selling them?
R4nk3d replied to Orionsbelter's topic in Miscellaneous
Ok, ill try and make this simple: The government owns the internet. The government = ICANN (Internet Corporation of Assigned Names and Numbers) The government owns all domains. The government registers the domains, and then a domain registrar registers the domain to their company. I.e. www.Godaddy.com registers ILikeToParty.com to their company after someone requests to buy it, then godaddy sells it to that person. Domains are very cheap, depending on what they say. Pledgeofallegiance.com last time i saw, was being bid on for $375,000.00 because of what it says. If you wanted to buy fsalgn43.com from godaddy, it would only cost about $10 from them i believe. So basically the domain tree is like this... Government Registers --> Domain Registrar Purchases From ICANN --> You Purchase them from the domain registrar. You can sell them by using 2 ways: 1. You get a reseller account from a site like godaddy.com, you buy them from godaddy, and sell them to others, same as hosting. 2. You apply for accreditation to ICANN to register domains and become a certified domain registrar. This has a $2,500 not refundable fee just to apply. This also requires you to know a lot about servers and how to run a DNS server. I suggest that if you want to sell them, go with option one, because #2 has a long form to fill out which i have on my computer that is 10kb long with many questions and it costs $2,500 and you will need to script a complicated system on how to work this. I hope this helps you. -
What O\S are you tunning? I would assume one of Apple's! Vista Sucks, why am I the only one running XP? Im running XP Pro. I hate vista, and the home edition doesnt allow RDC to come into your computer, so I got pro.