
eliktris
Members-
Posts
15 -
Joined
-
Last visited
Never
Everything posted by eliktris
-
lol- now try not to laugh too hard.. but i dont know how to even do that... lol i'm gonna try finding something later (a tutorial somewhere) that might show me where to put it in my code.. i think i may even have it placed wrong.. lol.. as soon as my kids are all calm and not bugging the heck out of me i can concentrate on it..
-
sorry.. i guess i should have mentioned - i took out the actual data b/c last time i left it all in there and i was told i shouldnt.. .. hehe - i'm batting 0 here..lol whats a from clause? $sql = mysql_query("SELECT * FROM database name LIMIT 1");//you forgot the FROM clause is the teal not the from clause? i just didnt put in my database name - is it supposed to be database name - or is it the table name or something else? ............. thinking its just gonna be easier to just keep updating the darn thing hourly than figuring this out..lol.. its taking me days!! ??? ........must.... not...give... up!!
-
ok, so just when i think i got this going right... its not displaying in the spot at all.. maybe someone can tell me what i've got wrong now :s </h4>There are currently <?php include('connect.php'); $sql = mysql_query("UPDATE database name SET field name=field name+1"); $sql = mysql_query("SELECT * database name"); $row(i dont know what this is for) = mysql_fetch_assoc($sql); $field name= $row['field name']; echo $field name;?><span class="c1"> JK's Registered and 54 Attendee's registered<br /> oh.. how do i set an interger or "number" in the database.. so it starts at a specific number?
-
yes/no - there is another "total" i need to have also count and then display in the counter jeeps and passengers.. so i guess i will have to figure out how to have that go to the database and that total will vary from vehicle to vehicle) for now - these are the only 2 main peices of info required to go to the database and be retreived.. cheers Christine
-
what do you mean by that?? can you please explain - i'm thinking you make a connect.php file - and its on your server - how does each html page connect to it/or it connect to each html page... or do i just put that connect.php script into each page that it is required? sorry if its a dumb question to ask... cheers eliktris
-
i think i'm lost....and terribly confused.. sorry ??? :'( previous to this "thing" i'm trying to do now, there is no database end doing anything, the form has a simple "mailto" on submit currently and the filled out form gets emailed to the client. so everything i'm doing in php/mysql is fresh from scratch here.. along with my lack of php/mysql knowldge.. anyhow.. what does the "count" function do - besides the obvious.. would it "count" each time someone submits a registration? i really wish i can find a local school or someone who would sit with me for a few hours and chisel this stuff into my head
-
hehe - opps.. i am new!! i guess i will go and change those now thanks for pointing it out..lol
-
Good Morning... - ok, so this is what i got now... i've got my connect.php file created (question, and sorry for being dumb... but this will realize when someone hits submit on a misc page in the website? i dont see it pointing to any one location other than the submit.. wouldnt this work better if it was in the same code as the actual registration page? sorry for being skeptic.. i'm just confused.. i feel like im missing something.. "php" <?php if ($HTTP_POST_VARS['submit']) { mysql_connect("jkja3172_jester","jkjam31","jester3172"); mysql_select_db("jeeps"); $query ="INSERT INTO jeeps (total)"; $query.=" VALUES ('+1')"; ?> "/php" and then i think i got the right query string coming along that would go on the page where it is being counted... "php" $query="SELECT * FROM jeeps"; $result=mysql_query($query); echo "<b>there are $jeeps registered"; } "/php" ?> am i getting there?
-
ok, so created database... and think i might have figured out the right code - sorta - does it sound right? i got <?php if ($HTTP_POST_VARS['submit']) { mysql_connect("server","username","password"); mysql_select_db("jeeps"); $query ="INSERT INTO jeeps (total)"; $query.=" VALUES ('+1')"; ?> that goes on the same page as the registration form... and then... <?php mysql_connect("server","username","password"); mysql_select_db("dbname"); $result=mysql_query($query); mysql_fetch_row($result)) { echo "$result"; } ?> going on the actual page where the counter is... and sorry for being "dumb" and not seeming like i'm not trying to figure this out myself, as you can clearly see i am trying.. just thought this would be a friendly place to help an absolute beginner-php-programmer.. sorry if my request has offended anyone.. but i'm sure i'm not the only person who has started at this level and asked for help.. thanks for those who have been helping it really is great to have your advice. i assure you i'm not profiting from this other than expanding my knowledge and to me, that is great in itself! cheers eliktris
-
oh boy - ok so now that i know what i have to do, can anyone help me figure out how write the script? in the mean time - i'll go create the database
-
Hi Mikesta - well, i'm a xhtml/css coder - and very very beginner in php /mySQL as well - but i do know how to create a database!(i think) i've been trying to learn php and MySQL for a while and slowly starting to see a flicker of hope.. but not enough to get me going.. anyhow i can medal around in existing code somewhat to tweak what i need- and i can create a database... but thats about the extent of it.. i guess i need to fully explain myself... and the problem i have.. basically right now - the client emails me (practically 2/3 times a day) with each new # of registrations he gets(each registration is emailed to him).. and i add his total to the current displayed total on his website. the registration is for the number of jeeps getting registered into an event, and also how many people will be riding in the jeep. example- it says: there are currently "20" jeeps registered and 56 participants for this event! i'm hoping to have these adjust themselves with each time the registration is submitted.... so i'm not pestered just to update it by 1 myself 3 times a day...lol ok, so am i understanding this right - i need to : 1. create a database to "save" the current number (say 20) only question i have is - will it only need to be one field? so create database named "jeeps" and have it have a field of 1? 2. then, i need a script to query that database for that number when someone submits their registration - and then it increase that number by 1 - "now 21" (this is another page?) 3. and then that page will post the "21" on the page where the counter is? thanks again guys for speaking in simple terms!!!
-
Hi there, i am an extreme newbie to Javascript and know basically nothing about it.. i have a current client that i have volunteered my time for. things are getting to be a bit tedious and can only imagine it will get worse as it gets closer to the event.. anyhow i'm hoping someone here can help me (i'm begging!!), basically what i have a counter on a page that with each registration for a particular event, i manually go and update the counter on how many participants it is going to have (on a separate page from the registration) i'm hoping that what can be done, is for each time someone hits submit, that i can have it automatically increase the number by 1. i was originally thinking it was a php script (i'm just starting with that one) but someone on the php forum here suggested it should/could be done with javascript. anyone have any advice?? thanks so much in advance eliktris
-
yes it would need to increment with each new registration.. hmm ok so i need to put the <?php $counter = 0; if (isset($_POST['my_button'])) { $counter += 1; echo $counter; } ?> into the form.. and the <?php include('myPhPpage'); ?> onto the page that has the counter... the 'myPhPpage' is that the page name that the counter is on? its not in php does that matter? the whole site is xhtml/css right now except for the minor php used for the form. thanks again for helping me
-
ohhh yay - ok that looks really really easy.. and excuse me for being stupid -please can you spell this out to me like i'm in kindergarten..lol and i apologize. i assume, i would put this in my form before/near the submit button, and i would have to put the place holder in the page that holds the counter (its 2 separate pages) how do i link the 2 pages together in the php script? thanks again sooo much - you rock!
-
Hi there, i'm very new at PHP and although i'm trying real hard to understand these online tutorials i'm slower than a snail trying to run the race.. anyhow - i have a client i've volunteered to help out and i've been doing manual updates to a site for each registration that comes in. it is getting rather tedious and well i know there has to be a script for it somewhere.. basically i need help in creating the script, i know its with math!! what i'm hoping to have done, is that with each time the registration is "submitted" have the counter (on the home page) increase by 1.. can anyone help me out? i really appreciate this more than you would know.. if anything it helps me to see if i am on the right track.. i'm thinking its a operator or something and would go like $submit= $counter+1 or something.. maybe i'm probably far off base thanks for any advice or help Cheers Eliktris