IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.49 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-15
Pages: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Next >
[00:00]<svjzdzxzsnz>ha? No.
[00:00]<mzzcl>jamey: Uncomment/add extension=sqlite.so in your php.ini file and restart apache
[00:01]<rrdnd>MarkL, it is uncommented, I checked. phpinfo() returns /etc/php5/apache2/php.ini as the location, which is correct.
[00:02]<mzzcl>jamey: Does a <?php phpinfo() ?> page show a sqlite section?
[00:03]<rrdnd>MarkL, no it doesn't which was my first port of call - "dbx" has SQLite listed in its supported databases but I doubt that's of any help. I'm guessing sqlite.so never gets loaded but it's referenced and exists...
[00:05]<mzzcl>jamey: It's worth stopping apache, making sure there's no apache processes still running (kill -9 them is there are), starting apache and also clearing your browser cache just to rule that out as a problem.
[00:05]<czm2zymrnw1>because i use $_POST['Appointments'] which value Appointments suppose to be?? The name of the list box the id or the value?
[00:05]<czm2zymrnw1>im confused
[00:06]<fmrs>hi
[00:06]<rrdnd>MarkL, I stopped and started Apache and then did a 'force-reload'. SQLite has popped up in phpinfo() and my script now works! Thank you :-)
[00:06]<fmrs>if I have a function that prints some string
[00:06]<fmrs>cand I caputre its output?
[00:07]<czm2zymrnw1>i understood that but if i change them what the $_POST['Appointments'] should be? Is it gonna be the name i give in the list box or the value?
[00:07]<czm2zymrnw1>i understood that but if i change them what the $_POST['Appointments'] should be? Is it gonna be the name i give in the list box or the value?
[00:07]<fmrs>with ob?
[00:07]<mzzcl>Cambridge13: With <select name="foo"><option value="bar" ... $_POST['foo'] would have the value bar
[00:07]<czm2zymrnw1>soz
[00:07]<mzzcl>ldas: Yeah
[00:07]<fmrs>cool
[00:08]<czm2zymrnw1>so in the $_POST[' '] i put the value of the <select name> not any other value
[00:08]<czm2zymrnw1>right?
[00:08]<mzzcl>Cambridge13: yeah
[00:09]<czm2zymrnw1>let me try that
[00:09]<mzzcl>Cambridge13: If you're ever unsure just do a var_dump($_POST); to see what's in there
[00:10]<sjpvwjzc_> i insert Joćo to bd, in phpmyadmin i see JoĆ£o
[00:10]<sjpvwjzc_>is normal?
[00:11]<czm2zymrnw1>where should i write this var_dump...
[00:11]<czm2zymrnw1>?
[00:12]<mzzcl>Cambridge13: Usually at the top of the script you post to inside something like, if(!empty($_POST)){ echo '<pre>'; var_dump($_POST); echo '</pre>'; }
[00:13]<sddvr2>hello
[00:13]<svjzdzxzsnz>yes
[00:14]<sddvr2>to have ssh functions in php, i need to compile php with libssh2 support or is there a way to load the support after php is installed?
[00:15]<mzzcl>symtab: http://php.net/ssh tells you how to do it without a recompile
[00:15]<sddvr2>MarkL: thanks
[00:16]<czm2zymrnw1> Undefined index: Appointments
[00:17]<czm2zymrnw1>i dont know why the query does not work.
[00:17]<czm2zymrnw1>maybee i need to play around with the quotes
[00:17]<mzzcl>Do you have <select name="Appointments"> ?
[00:17]<czm2zymrnw1>yes
[00:17]<czm2zymrnw1>it always gives me the same error
[00:17]<mzzcl>Do the var_dump thing and see what's in there
[00:18]<czm2zymrnw1>is it gonna return the contents in the web page then?
[00:19]<mzzcl>It's going to return the contents of the $_POST array, i.e the stuff you submitted
[00:21]<kgzggf_2uzggz>Hi guys. Is it possible to make a link in an iframe that refreshes the whole page?
[00:21]<czm2zymrnw1>ok i got them. but i need to figure out what is each one
[00:22]<mzzcl>Kernel_burner: Tried using target="_top" ?
[00:24]<kgzggf_2uzggz>ok it works. Thanks alot!
[00:24]<mzzcl>np
[00:26]<czm2zymrnw1>check this http://hashphp.org/pastebin?pid=6690
[00:27]<czm2zymrnw1>uuff it didnt post it .ita gave me a server error
[00:27]<czm2zymrnw1>sorry i will post it again
[00:27]<mzzcl>Cambridge13: <option value='FreeHours'> .. that inside your loop will give every option the same value
[00:28]<czm2zymrnw1>http://hashphp.org/pastebin?pid=6695 there u go
[00:30]<czm2zymrnw1>so how i will print the data of the table? should i only move the <option value='FreeHours'> out of the loop?
[00:31]<mzzcl>Cambridge13: Depends, what value would you like to get? The VetName, FreeHour etc? Should be a unique value
[00:31]<sddvr2>/usr/local/bin/phpize: /tmp/tmpWvImDi/ssh2-0.10/build/shtool: /bin/sh: bad interpreter: Permission denied
[00:31]<sddvr2>Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
[00:31]<sddvr2>any ideas how i can fix this
[00:31]<sddvr2>?
[00:32]<svjzdzxzsnz>install autoconf?
[00:33]<czm2zymrnw1>yeah but each value of the list box (each entry) consists of three things: FreeHourID, VetName Day and Time which are taken from one table through an array
[00:33]<mzzcl>Cambridge13: You want to know which one they selected, so which field in the db can you use to identify the one they selected?
[00:33]<svjzdzxzsnz>!tell Cambridge13 about u
[00:33]<czm2zymrnw1>i guess the FreeHourID
[00:33]<mzzcl>Cambridge13: Ah, you need FreeHoursID?
[00:34]<mzzcl>So use, <option value='".$row['FreeHourID']."'>
[00:34]<czm2zymrnw1>outside of the loop??
[00:34]<mzzcl>In the loop
[00:34]<czm2zymrnw1>ok let me see
[00:34]<mzzcl>That will give each option a unique value
[00:34]<czm2zymrnw1>aha
[00:36]<rrrddns>if a constructor fails to fully create an object what is the Approved Way(tm) of returning that error?
[00:36]<rrrddns>in php 5
[00:37]<mzzcl>"An object will always be assigned when creating a new object unless the object has a constructor defined that throws an exception on error."
[00:38]<rrrddns>well, that's simple enough
[00:38]<rrrddns>thanks
[00:42]<czm2zymrnw1>ok now it reads the FreeHourID
[00:42]<czm2zymrnw1>but the query does not delete it
[00:43]<fmrs>how do I access a variable from outside a class?
[00:43]<fmrs>is there something like ::$var?
[00:43]<czm2zymrnw1>should i change '" . $_POST['Appointments']."' with '" . $_POST['$row['FreeHourID']."' ??
[00:43]<mzzcl>no
[00:44]<mzzcl>Just debug it:
[00:44]<mzzcl>$sql = 'DELETE FROM FreeHours WHERE FreeHoursID =' . $POST['Appointments'];
[00:44]<mzzcl>$delete = mysql_query($sql) or die(mysql_error());
[00:44]<fusxuyrr>...
[00:44]<fusxuyrr>that's how i usually write my code :S
[00:44]<czm2zymrnw1>yes i have already debug it. it gives me the error query failed
[00:44]<mzzcl>ldas: You probably shouldn't be accessing variables outside the class
[00:45]<mzzcl>Cambridge13: You need to know why it failed, the exact error
[00:45]<fmrs>uhm, I'm making a testunit and I need access to db connection vars
[00:46]<czm2zymrnw1>it doesnt say no. Before it ws saying that Appointments was undefined. Now it only gives me the data sent from the $_POST and then the message query failed
[00:46]<mzzcl>ldas: Have your db class return an instance and use $db = DB::getInstance(); for example in your class
[00:46]<mzzcl>Cambridge13: That's why i posted the code above, it will tell you exactly why it's failing
[00:46]<fmrs>let me see what I can do
[00:47]<fmrs>thanks, good idea
[00:52]<czm2zymrnw1>it worked
[00:52]<czm2zymrnw1>ii had a syntax error
[00:53]<czm2zymrnw1>now i dont want the var_dump($_POST); to display the info. is it ok to remove it?
[00:53]<mzzcl>Cambridge13: Yeah







