Greaser9780
Members-
Posts
326 -
Joined
-
Last visited
Never
Everything posted by Greaser9780
-
Might be another possible solution. Create a new table PRODUCTS prod_id,serial_number,description,revision_id,project_id also if your revisions table has an id for the revision you could include that id in your products table to reference what revision docs were used. revision_id Ditto with the project table.If it has an id field you could also enter it in products table. project_id
-
I saw it a couple days ago and thought of it.NP
-
[SOLVED] Newbee problem with UPDATE query from a form
Greaser9780 replied to steviemac's topic in PHP Coding Help
$id=$_POST['id'] $course=$_POST['Course'] $email_address=$_POST['email_address'] $update=$_POST['update'] $result = mysql_query("UPDATE bikepatrol SET id ='$id', Course='$Course', email_address = '$email_address' WHERE id = '$update' ") or die(mysql_error()); -
http://www.phpfreaks.com/tutorials/34/0.php
-
[SOLVED] Newbee problem with UPDATE query from a form
Greaser9780 replied to steviemac's topic in PHP Coding Help
Better code yet. -
[SOLVED] Newbee problem with UPDATE query from a form
Greaser9780 replied to steviemac's topic in PHP Coding Help
I think this: WHERE id = {$_POST['update']}") Needs to be changed to this: WHERE id = '{$_POST['update']}'") -
Are your download files already in a database?
-
I use sessions upon logging into my website. Then on my welcome page you can use an if statement to detect if there is a session for that user. If the user is logged in my pages display Welcome ".$_SESSION['username']." If they are not logged in it can display either please log in or in your case you could have it say "Welcome Guest!
-
Converting posted URL to html link
Greaser9780 replied to paulbenjaminturner's topic in PHP Coding Help
Is the url located in a db or something? -
I'm helping a guy out with a site that has a seperate login for the site and one for the vbulletin forum. I plan on revising his main site script so it will automatically register at both places. In the tables I found a couple of places where I will need to change the varchar count so that both fields accept the same number of characters. I am also going to need to insert a mysql_insert_id since the site table doesn't have an id field.Although I think it should.All I plan on doing is sending the appropriate required info into the vb_users table right after it gets sent to the site users table. Is there any special syntax I will need to use to put in one query right after another??? Also if anybody else has any ideas to help feel free to share.
-
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
It was in on the first code but then he revised it on the 3rd page of this topic -
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
So you used a cookie to set the user id? -
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
It also needs to be identified in the php. The query uses userid from php to relate to your table. Usually it is defined as a post userid or a session userid. Somewhere in the code before the query it should have $userid= then after the equal sign you define what exactly it is. What I am trying to say is, how does this php file identify with $userid? POST from a form, a session, or does it need passed on from the previous web page? -
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
What is $userid equal to? Other than your query statement. It must be defined before that. -
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
In your queries did you try putting single quotes around $userid at the end of your query?If not try it once. -
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
It still isn't defined. What does $userid stand for? $_POST['userid'], $_SESSION['userid'] -
Try changing this: $result1 = mysql_query("select distinct * from events WHERE (managerid = '$manager')") ; while($row = mysql_fetch_row($result1)) { $event_id = $row[0] ; if ($row[2] == "" || $row[2] == " ") { To this: $result1 = mysql_query("select distinct * from events WHERE managerid = '$manager'") ; while($row = mysql_fetch_row($result1)) { $event_id = $row[0] ; if ($row[2] == "") || ($row[2] == " ") { I am not superb with if statements but try it out
-
[SOLVED] What wrong with this? User ID seems to wreck it...
Greaser9780 replied to forumnz's topic in PHP Coding Help
I can't seem to find where you defined your variable $userid $userid=??? -
[SOLVED] if statement works but next one dont
Greaser9780 replied to ipwnzphp's topic in PHP Coding Help
You need single quotes around id WHERE id = '$row[id]'") (\"UPDATE `listings` SET listing_street='$listing_street' WHERE id = " .$row['id']."\") Try that once. -
I found this through google quick If register globals is on the code is: $ip=@$REMOTE_ADDR; echo "<font face='Verdana' size='3'><b>IP Address= $ip</b>"; If register globals is off the code is: $ip=$_SERVER['REMOTE_ADDR']; This is where I found it: http://www.plus2net.com/php_tutorial/php_ip.php
-
There must be a way to do it in php. In my phpBB forum it can get a users ip when they register. You can use it to ban users. U try a google search for php ip address?
-
Like the <input has value="blah". Doesn't there need to be one for the textarea?