The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Question...
Ok I have a page where user's can enter their information and once submitted, it takes them to a page where they can see their information along with everyone else who has submitted information.
I have a seperate admin page that will allow me to edit this info, however, I'm not sure if I want to use the ALTER TABLE command or just UPDATE to change specific information such as this: Name: John Doe What if I want to change it so it says "John" only? How do I do that? Thanks |
#2
|
||||
|
||||
well, you want to change the field name, so you have to use the update function:
[SQL]UPDATE tablename SET Name='John' WHERE Name='John Doe'[/sql] |
#3
|
||||
|
||||
That's what I thought, but I wasn't sure. Thanks!
|
#4
|
||||
|
||||
Instead of
PHP Code:
PHP Code:
|
#5
|
||||
|
||||
yes, it is possible, but you should use this:
PHP Code:
|
#6
|
||||
|
||||
Ok, thanks. Now the problem is that the variable $Name isn't declared in this PHP file, it's declared in another one. How do I make it to where it still works?
Thanks for the help, sir! |
#7
|
||||
|
||||
Btw, does this look right?
PHP Code:
|
#8
|
||||
|
||||
first question: hmm, if you include the file it would work, or you can call the script with a command line variable:
script.php?name=blabla if you call the script through an inputform use this in the form: <input type="hidden" name="name" value="which name...."> and no, this would be correct: PHP Code:
|
#9
|
||||
|
||||
Ok I don't understand what you were saying about my first question (regarding how the variable isn't in this particular script).
As of right now I'm using the require() function, and don't see the difference between require() and include(). Don't understand the point of something like "script.php?name=blabla" or how it would be used in context to what I'm working with. The hidden input also confuses me. Sorry, I'm still learning this stuff, doing the best I can, I appreciate all of your help, sir! |
#10
|
||||
|
||||
Ok well I've got problems galore, allow me to show you the actual page I'm working on. http://radon3k.bbadmins.com/index.php is the main page, there's a link to the second page, and http://radon3k.bbadmins.com/admin.php is where I'd edit the information.
Here's the problem: I want to edit a specific user name, so if let's say I wanted to change Ryan to Radon3k, how do I do this? I have the general idea, but my code is saying "change all the current names to the name I just typed into the admin name change box". Does this make sense or am I just confusing myself and everyone else? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|