-
Posts
39 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Colourtheory
-
I give up, it's just not working.. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, maker) VALUES (hi,hi,1)' at line 1 Sucks, I worked so hard on this website.
-
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/u705429760/public_html/newdiscussion.php on line 35
-
This is the new version <?php include('themesys.php') ?> <br><Br><div class="bbox"> <center> <?php session_start(); if (isset($_SESSION['user_id'])){ $con = mysql_connect("mystuff","mystuff","mypw");if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $id = $_SESSION['user_id']; $sql="INSERT INTO discussions (name, desc, maker)VALUES($_POST['namevalue'],$_POST['descvalue'],'$id')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "Discussion started!"; mysql_close($con); }else{header('Location: login.php');}?> </div></body>
-
Yeah, this is really upsetting because this is one of the main parts of the website, and something so small is ruining it.
-
This is so consfusing.. the script came off of a w3 example. I just edited it.
-
Let me check.. Also, a few variables have the same name could this be causing the problem?
-
<?php session_start(); require_once 'db.php';if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("u705429760_main", $con); $id = $_SESSION['user_id']; $sql="INSERT INTO discussions (name, desc, maker)VALUES('$_POST[name]', '$_POST[desc]', $id)"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "Discussion started!"; mysql_close($con);?>
-
Maybe there is a problem with the PHP part..
-
The second one turns out to be the exact same as the first error
-
It whites out the entire page and says Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/u705429760/public_html/newdiscussion.php on line 23
-
Doesn't work either
-
how to deny acces to website with a speciel browser ect?...
Colourtheory replied to rootKID's topic in PHP
You might want to block a browser that's not supported by your product.- 8 replies
-
- browser
- deny acces
-
(and 3 more)
Tagged with:
-
I've tried everything I can think of, any idea what's wrong? $sql="INSERT INTO discussions (name, desc, maker)VALUES('$_POST[name]', '$_POST[desc]', '$id')"; Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, maker) VALUES ('yo', 'yolo', '1')' at line 1
-
Maybe I should start over.. I think this script needs to be scrapped.
-
So I've been warned a few times about this, and I was wondering, how do I stop/prevent them? What methods are dangerous?
-
No error is coming up, but it doesn't change the value. <?phprequire_once 'db.php';$page_mode = isset($_POST['page_mode']) ? $_POST['page_mode'] : ''; if ($page_mode == 'setbio'){ $id = $_SESSION['id'];$find = mysql_query("SELECT bio FROM users WHERE id='$id'");$bio = mysql_fetch_assoc($find);$biotext = $_GET['bio'];$update = db_query("UPDATE users SET bio='$biotext'WHERE id='$id'"); } ?><?php session_start(); if (isset($_SESSION['user_id'])){?><h1>Customize your profile, <?php echo "" . $_SESSION['user_name'] . "!"; ?><br><form action="myprofile.php" method="post"><input type="hidden" name="page_mode" value="setbio"><input type="text" text="Bio" name="bio"><br><input type="submit" name="submit"></form><?php} else{header('Location: login.php'); } ?>
-
How do I make a background that doesn't move or scroll down with the page? Kind of like twitter, the page contents scroll and move down but the background doesn't. How can I do this?
-
Got it, forgot to fetch email. My bad.
-
<?phpsession_start();require_once 'db.php';$id = $_GET['id'];$user = mysql_query("SELECT name FROM users WHERE id='$id'");$result = mysql_fetch_assoc($user);$email = $result['email'];echo "<p>Username: " . $result['name'] . "<br>";echo "Email:" . $result['email'] . "<br>"; ?> Still not working.. hmm..
-
Wait, I made the username load but not the email. Confusing me..
-
So I tried to make a profile page.. it's not working out so well. Here is the profile page's source, and note: the address bar when you click the link comes out to be ?id= and even if I type the ?id=1 it still doesn't work <?phpsession_start();require_once 'db.php'; $id = $_GET['id'];$user = mysql_query("SELECT name FROM users WHERE id='$id'"); echo "<h1>User Info</h1>"; echo "<p>Username:" . $user['name'] . "<br>";echo "Email:" . $user['email'] . "<br>"; ?>
-
I set the position to relative then 0px top and 0px left, thanks!
-
I made a header, but for some reason it has spacing on the top, left and right (probably bottom too) and I want it to be like Twitters, on the top with no spacing. I know it's probably basic, but how would I fix this?